summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/dell-wmi.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-12-26 21:51:38 -0500
committerLen Brown <len.brown@intel.com>2009-12-30 02:48:38 -0500
commitabb631bfe271a9102fb5b05419272b7aec37a974 (patch)
treef0ecbe382e7c53da9ec189024c88f8c0c8eb40c2 /drivers/platform/x86/dell-wmi.c
parent6b7b284958d47b77d06745b36bc7f36dab769d9b (diff)
downloadblackbird-op-linux-abb631bfe271a9102fb5b05419272b7aec37a974.tar.gz
blackbird-op-linux-abb631bfe271a9102fb5b05419272b7aec37a974.zip
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: Paul Rolland <rol@as2917.net> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform/x86/dell-wmi.c')
-rw-r--r--drivers/platform/x86/dell-wmi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index 916ccb2b316c..4c7e70299d6b 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -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");
@@ -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;
OpenPOWER on IntegriCloud