Commit 7227dedbc22f66f1bd310c866053b08de0496e38
Committed by
Matthew Garrett
1 parent
f11113b22c
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff
drivers/platform/x86/sony-laptop.c
... | ... | @@ -1594,9 +1594,11 @@ |
1594 | 1594 | if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "SN00", |
1595 | 1595 | &handle))) { |
1596 | 1596 | dprintk("Doing SNC setup\n"); |
1597 | - if (sony_nc_handles_setup(sony_pf_device)) | |
1597 | + result = sony_nc_handles_setup(sony_pf_device); | |
1598 | + if (result) | |
1598 | 1599 | goto outpresent; |
1599 | - if (sony_nc_kbd_backlight_setup(sony_pf_device)) | |
1600 | + result = sony_nc_kbd_backlight_setup(sony_pf_device); | |
1601 | + if (result) | |
1600 | 1602 | goto outsnc; |
1601 | 1603 | sony_nc_function_setup(device); |
1602 | 1604 | sony_nc_rfkill_setup(device); |