]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ACPI / LPSS: make code less confusing for reader
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 20 Mar 2013 12:14:30 +0000 (12:14 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 24 Mar 2013 23:21:49 +0000 (00:21 +0100)
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>
drivers/acpi/acpi_lpss.c

index c87db0e47d095286934fb8e376b5916ee4fe2d80..b1c95422ce74ab79dd13937fd6a7ad260e1055e5 100644 (file)
@@ -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;
                }
        }