Skip to content

Commit

Permalink
dell-wmi: sys_init_module: 'dell_wmi'->init suspiciously returned 21,…
Browse files Browse the repository at this point in the history
… it should follow 0/-E convention

wmi_install_notify_handler() returns an acpi_error,
but dell_wmi_init() needs return a -errno style error.

Signed-off-by: Len Brown <len.brown@intel.com>
Tested-by: Paul Rolland <rol@as2917.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Len Brown authored and Linus Torvalds committed Dec 30, 2009
1 parent b58454e commit 5ccf73b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/platform/x86/dell-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ static int __init dell_wmi_input_setup(void)
static int __init dell_wmi_init(void)
{
int err;
acpi_status status;

if (wmi_has_guid(DELL_EVENT_GUID)) {
printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n");
Expand All @@ -336,14 +337,14 @@ static int __init dell_wmi_init(void)
if (err)
return err;

err = wmi_install_notify_handler(DELL_EVENT_GUID,
status = wmi_install_notify_handler(DELL_EVENT_GUID,
dell_wmi_notify, NULL);
if (err) {
if (ACPI_FAILURE(status)) {
input_unregister_device(dell_wmi_input_dev);
printk(KERN_ERR
"dell-wmi: Unable to register notify handler - %d\n",
err);
return err;
status);
return -ENODEV;
}

return 0;
Expand Down

0 comments on commit 5ccf73b

Please sign in to comment.