diff options
author | Dan Carpenter <error27@gmail.com> | 2011-02-26 13:54:57 +0100 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2011-03-28 12:07:25 +0200 |
commit | 7227dedbc22f66f1bd310c866053b08de0496e38 (patch) | |
tree | d6abcf6031bca9d042dfba9d4e0088f7cdf55891 /drivers/platform/x86 | |
parent | sony-laptop: make a couple variables static (diff) | |
download | linux-7227dedbc22f66f1bd310c866053b08de0496e38.tar.xz linux-7227dedbc22f66f1bd310c866053b08de0496e38.zip |
sony-laptop: return negative on failure in sony_nc_add()
There were two places in sony_nc_add() where we returned zero on failure
instead of a negative error code.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 60d83343fb01..363b89ef61cc 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -1594,9 +1594,11 @@ static int sony_nc_add(struct acpi_device *device) if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "SN00", &handle))) { dprintk("Doing SNC setup\n"); - if (sony_nc_handles_setup(sony_pf_device)) + result = sony_nc_handles_setup(sony_pf_device); + if (result) goto outpresent; - if (sony_nc_kbd_backlight_setup(sony_pf_device)) + result = sony_nc_kbd_backlight_setup(sony_pf_device); + if (result) goto outsnc; sony_nc_function_setup(device); sony_nc_rfkill_setup(device); |