Skip to content

Commit

Permalink
sony-laptop: return negative on failure in sony_nc_add()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Matthew Garrett committed Mar 28, 2011
1 parent f11113b commit 7227ded
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/platform/x86/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7227ded

Please sign in to comment.