Commit abb631bf authored by Len Brown's avatar Len Brown

dell-wmi: sys_init_module: 'dell_wmi'->init suspiciously returned 21, it should

follow 0/-E convention

wmi_install_notify_handler() returns an acpi_error,
but dell_wmi_init() needs return a -errno style error.
Tested-by: default avatarPaul Rolland <rol@as2917.net>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 6b7b2849
...@@ -323,6 +323,7 @@ static int __init dell_wmi_input_setup(void) ...@@ -323,6 +323,7 @@ static int __init dell_wmi_input_setup(void)
static int __init dell_wmi_init(void) static int __init dell_wmi_init(void)
{ {
int err; int err;
acpi_status status;
if (wmi_has_guid(DELL_EVENT_GUID)) { if (wmi_has_guid(DELL_EVENT_GUID)) {
printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n"); printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n");
...@@ -336,14 +337,14 @@ static int __init dell_wmi_init(void) ...@@ -336,14 +337,14 @@ static int __init dell_wmi_init(void)
if (err) if (err)
return err; return err;
err = wmi_install_notify_handler(DELL_EVENT_GUID, status = wmi_install_notify_handler(DELL_EVENT_GUID,
dell_wmi_notify, NULL); dell_wmi_notify, NULL);
if (err) { if (ACPI_FAILURE(status)) {
input_unregister_device(dell_wmi_input_dev); input_unregister_device(dell_wmi_input_dev);
printk(KERN_ERR printk(KERN_ERR
"dell-wmi: Unable to register notify handler - %d\n", "dell-wmi: Unable to register notify handler - %d\n",
err); status);
return err; return -ENODEV;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment