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 <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
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);