diff options
author | Dan Carpenter <error27@gmail.com> | 2010-12-06 16:44:23 -0500 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2010-12-20 10:58:29 -0500 |
commit | 0fe0e1602e1a08c3cf33add574cc803019c06092 (patch) | |
tree | e779aa52934f7df3a6eb6995643753b5947642f0 /drivers/platform | |
parent | af684a6dd5ef560a6935d1c0e1edc444f76b1cdd (diff) |
WMI: return error if wmi_create_device() fails
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>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/wmi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index b8e5383eab0c..05cc79672a8b 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -820,7 +820,7 @@ static acpi_status parse_wdg(acpi_handle handle) retval = wmi_create_device(&gblock[i], wblock, handle); if (retval) { wmi_free_devices(); - break; + goto out_free_pointer; } } |