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 c64eefd48c "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>
This commit is contained in:
Dan Carpenter 2010-12-06 16:44:23 -05:00 committed by Matthew Garrett
parent d358cb55a4
commit e1e0dacba5
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}