瀏覽代碼

ACPI / LPSS: make code less confusing for reader

The excerpt like this:

	if (err) {
		err = 0;
		goto error_out;
	}

makes a reader confused even if it's commented. Let's do necessary actions and
return no error explicitly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Andy Shevchenko 12 年之前
父節點
當前提交
cf8df962aa
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/acpi/acpi_lpss.c

+ 2 - 2
drivers/acpi/acpi_lpss.c

@@ -150,8 +150,8 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
 			 * Skip the device, but don't terminate the namespace
 			 * scan.
 			 */
-			ret = 0;
-			goto err_out;
+			kfree(pdata);
+			return 0;
 		}
 	}