WMI: return error if wmi_create_device() fails
Subsystems (2)
PATCH 1/1 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 <[email protected]>
drivers/platform/x86/wmi.c +1 -1
@@ -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) {
Quoted 6 lines · Dan Carpenter
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 intowmi_block"Signed-off-by Dan Carpenter <[email protected]>
Oops, thanks for finding it.
Acked-by Dmitry Torokhov <[email protected]>
Quoted 13 lines
drivers/platform/x86/wmi.c +1
-1@@ -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) {
Signature · 1 line
Dmitry
Matthew Garrett
AppliedApplied to -next, thanks.
Signature · 1 line
Matthew Garrett | [email protected]