Skip to content

Commit

Permalink
WMI: return error if wmi_create_device() fails
Browse files Browse the repository at this point in the history
The break resets the retval to 0 but we want to return an error code.
This was introduced in c64eefd "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>
  • Loading branch information
Dan Carpenter authored and Matthew Garrett committed Jan 7, 2011
1 parent d358cb5 commit e1e0dac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit e1e0dac

Please sign in to comment.