X86 platform drivers
 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

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