diff options
author | Matthew Garrett <mjg@redhat.com> | 2010-03-01 09:46:43 -0500 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2010-03-01 09:46:43 -0500 |
commit | 92e00e47b61f558009ff81be42b412a76fd89d84 (patch) | |
tree | f291c7eafef38b929a2d0240b94f60f64993fb9e /drivers/platform | |
parent | 94d8f785dd1f021c1971df73e6437f000c0d9449 (diff) |
dell-laptop: Fix errors on failure and exit paths
Make sure that work is cancelled after removing the i8042 filter, and
unregister the platform device rather than deleting it.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/dell-laptop.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 29d96a4f576..ef614979afe 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c | |||
@@ -580,6 +580,7 @@ static int __init dell_init(void) | |||
580 | 580 | ||
581 | fail_backlight: | 581 | fail_backlight: |
582 | i8042_remove_filter(dell_laptop_i8042_filter); | 582 | i8042_remove_filter(dell_laptop_i8042_filter); |
583 | cancel_delayed_work_sync(&dell_rfkill_work); | ||
583 | fail_filter: | 584 | fail_filter: |
584 | dell_cleanup_rfkill(); | 585 | dell_cleanup_rfkill(); |
585 | fail_rfkill: | 586 | fail_rfkill: |
@@ -597,12 +598,12 @@ fail_platform_driver: | |||
597 | 598 | ||
598 | static void __exit dell_exit(void) | 599 | static void __exit dell_exit(void) |
599 | { | 600 | { |
600 | cancel_delayed_work_sync(&dell_rfkill_work); | ||
601 | i8042_remove_filter(dell_laptop_i8042_filter); | 601 | i8042_remove_filter(dell_laptop_i8042_filter); |
602 | cancel_delayed_work_sync(&dell_rfkill_work); | ||
602 | backlight_device_unregister(dell_backlight_device); | 603 | backlight_device_unregister(dell_backlight_device); |
603 | dell_cleanup_rfkill(); | 604 | dell_cleanup_rfkill(); |
604 | if (platform_device) { | 605 | if (platform_device) { |
605 | platform_device_del(platform_device); | 606 | platform_device_unregister(platform_device); |
606 | platform_driver_unregister(&platform_driver); | 607 | platform_driver_unregister(&platform_driver); |
607 | } | 608 | } |
608 | kfree(da_tokens); | 609 | kfree(da_tokens); |