kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] WMI: return error if wmi_create_device() fails
@ 2010-11-25 17:35 Dan Carpenter
  2010-11-27  8:20 ` Dmitry Torokhov
  2010-12-06 22:02 ` Matthew Garrett
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2010-11-25 17:35 UTC (permalink / raw)
  To: Carlos Corbacho
  Cc: Matthew Garrett, platform-driver-x86, dmitry.torokhov,
	kernel-janitors

The break resets the retval to 0 but we want to return an error code.
This was introduced in c64eefd48c4 "WMI: embed struct device directly
into wmi_block"

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 104b77c..a5b7a4d 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -812,7 +812,7 @@ static acpi_status parse_wdg(acpi_handle handle)
 		if (IS_ERR(wblock)) {
 			retval = PTR_ERR(wblock);
 			wmi_free_devices();
-			break;
+			goto out_free_pointer;
 		}
 
 		if (debug_event) {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch] WMI: return error if wmi_create_device() fails
  2010-11-25 17:35 [patch] WMI: return error if wmi_create_device() fails Dan Carpenter
@ 2010-11-27  8:20 ` Dmitry Torokhov
  2010-12-06 22:02 ` Matthew Garrett
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2010-11-27  8:20 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Carlos Corbacho, Matthew Garrett, platform-driver-x86,
	kernel-janitors

On Thu, Nov 25, 2010 at 08:35:52PM +0300, Dan Carpenter wrote:
> The break resets the retval to 0 but we want to return an error code.
> This was introduced in c64eefd48c4 "WMI: embed struct device directly
> into wmi_block"
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 

Oops, thanks for finding it.

Acked-by: Dmitry Torokhov <dtor@mail.ru>


> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index 104b77c..a5b7a4d 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -812,7 +812,7 @@ static acpi_status parse_wdg(acpi_handle handle)
>  		if (IS_ERR(wblock)) {
>  			retval = PTR_ERR(wblock);
>  			wmi_free_devices();
> -			break;
> +			goto out_free_pointer;
>  		}
>  
>  		if (debug_event) {

-- 
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] WMI: return error if wmi_create_device() fails
  2010-11-25 17:35 [patch] WMI: return error if wmi_create_device() fails Dan Carpenter
  2010-11-27  8:20 ` Dmitry Torokhov
@ 2010-12-06 22:02 ` Matthew Garrett
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Garrett @ 2010-12-06 22:02 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Carlos Corbacho, platform-driver-x86, dmitry.torokhov,
	kernel-janitors

Applied to -next, thanks.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-06 22:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-25 17:35 [patch] WMI: return error if wmi_create_device() fails Dan Carpenter
2010-11-27  8:20 ` Dmitry Torokhov
2010-12-06 22:02 ` Matthew Garrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).