diff options
author | Len Brown <len.brown@intel.com> | 2009-12-24 01:19:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-12-24 01:19:00 -0500 |
commit | fcb11235d3910c39afece52f6e106a9ca565d34b (patch) | |
tree | 07412f9c367f5f9bf6ad7ccd6fa8146c4aba68af /drivers/platform/x86/dell-wmi.c | |
parent | 78a5331dddcffabadef024ccc051f7a519b13238 (diff) | |
parent | 44ef00e6482e755f36629773abc2aee83a6f53e3 (diff) | |
download | op-kernel-dev-fcb11235d3910c39afece52f6e106a9ca565d34b.zip op-kernel-dev-fcb11235d3910c39afece52f6e106a9ca565d34b.tar.gz |
Merge branch 'misc-2.6.33' into release
Diffstat (limited to 'drivers/platform/x86/dell-wmi.c')
-rw-r--r-- | drivers/platform/x86/dell-wmi.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 67f3fe7..916ccb2 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -238,6 +238,7 @@ static void dell_wmi_notify(u32 value, void *context) input_sync(dell_wmi_input_dev); } } + kfree(obj); } @@ -324,37 +325,34 @@ static int __init dell_wmi_init(void) int err; if (wmi_has_guid(DELL_EVENT_GUID)) { + printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n"); + return -ENODEV; + } - dmi_walk(find_hk_type, NULL); - - err = dell_wmi_input_setup(); - - if (err) - return err; - - err = wmi_install_notify_handler(DELL_EVENT_GUID, - dell_wmi_notify, NULL); - if (err) { - input_unregister_device(dell_wmi_input_dev); - printk(KERN_ERR "dell-wmi: Unable to register" - " notify handler - %d\n", err); - return err; - } + dmi_walk(find_hk_type, NULL); + acpi_video = acpi_video_backlight_support(); - acpi_video = acpi_video_backlight_support(); + err = dell_wmi_input_setup(); + if (err) + return err; - } else - printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n"); + err = wmi_install_notify_handler(DELL_EVENT_GUID, + dell_wmi_notify, NULL); + if (err) { + input_unregister_device(dell_wmi_input_dev); + printk(KERN_ERR + "dell-wmi: Unable to register notify handler - %d\n", + err); + return err; + } return 0; } static void __exit dell_wmi_exit(void) { - if (wmi_has_guid(DELL_EVENT_GUID)) { - wmi_remove_notify_handler(DELL_EVENT_GUID); - input_unregister_device(dell_wmi_input_dev); - } + wmi_remove_notify_handler(DELL_EVENT_GUID); + input_unregister_device(dell_wmi_input_dev); } module_init(dell_wmi_init); |