* [patch 2/4] sony-laptop: return negative on failure in
@ 2011-02-26 12:54 Dan Carpenter
2011-02-27 12:27 ` Mattia Dongili
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-02-26 12:54 UTC (permalink / raw)
To: Mattia Dongili; +Cc: Matthew Garrett, platform-driver-x86, kernel-janitors
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>
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index a7b9c72..d0d0522 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -1593,9 +1593,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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch 2/4] sony-laptop: return negative on failure in
2011-02-26 12:54 [patch 2/4] sony-laptop: return negative on failure in Dan Carpenter
@ 2011-02-27 12:27 ` Mattia Dongili
0 siblings, 0 replies; 2+ messages in thread
From: Mattia Dongili @ 2011-02-27 12:27 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Matthew Garrett, platform-driver-x86, kernel-janitors
On Sat, Feb 26, 2011 at 03:54:57PM +0300, Dan Carpenter wrote:
> 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>
Acked-by: Mattia Dongili <malattia@linux.it>
> diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
> index a7b9c72..d0d0522 100644
> --- a/drivers/platform/x86/sony-laptop.c
> +++ b/drivers/platform/x86/sony-laptop.c
> @@ -1593,9 +1593,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);
--
mattia
:wq!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-27 12:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-26 12:54 [patch 2/4] sony-laptop: return negative on failure in Dan Carpenter
2011-02-27 12:27 ` Mattia Dongili
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox