diff options
author | Len Brown <len.brown@intel.com> | 2009-12-30 01:21:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-30 15:42:53 -0500 |
commit | 5ccf73bb4dc7cc9e1f761202a34de5714164724f (patch) | |
tree | cbda05c7cccbd6f79644b14021635481ac0e8b44 | |
parent | b58454ec25e80fdb84e294758aeb22dd6d5ee6f9 (diff) |
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.
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>
-rw-r--r-- | drivers/platform/x86/dell-wmi.c | 9 |
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) | |||
323 | static int __init dell_wmi_init(void) | 323 | static int __init dell_wmi_init(void) |
324 | { | 324 | { |
325 | int err; | 325 | int err; |
326 | acpi_status status; | ||
326 | 327 | ||
327 | if (wmi_has_guid(DELL_EVENT_GUID)) { | 328 | if (wmi_has_guid(DELL_EVENT_GUID)) { |
328 | printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n"); | 329 | printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n"); |
@@ -336,14 +337,14 @@ static int __init dell_wmi_init(void) | |||
336 | if (err) | 337 | if (err) |
337 | return err; | 338 | return err; |
338 | 339 | ||
339 | err = wmi_install_notify_handler(DELL_EVENT_GUID, | 340 | status = wmi_install_notify_handler(DELL_EVENT_GUID, |
340 | dell_wmi_notify, NULL); | 341 | dell_wmi_notify, NULL); |
341 | if (err) { | 342 | if (ACPI_FAILURE(status)) { |
342 | input_unregister_device(dell_wmi_input_dev); | 343 | input_unregister_device(dell_wmi_input_dev); |
343 | printk(KERN_ERR | 344 | printk(KERN_ERR |
344 | "dell-wmi: Unable to register notify handler - %d\n", | 345 | "dell-wmi: Unable to register notify handler - %d\n", |
345 | err); | 346 | status); |
346 | return err; | 347 | return -ENODEV; |
347 | } | 348 | } |
348 | 349 | ||
349 | return 0; | 350 | return 0; |