Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7227dedb authored by Dan Carpenter's avatar Dan Carpenter Committed by Matthew Garrett
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent f11113b2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);