Commit 92e00e47 authored by Matthew Garrett's avatar Matthew Garrett

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: default avatarMatthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
parent 94d8f785
...@@ -580,6 +580,7 @@ static int __init dell_init(void) ...@@ -580,6 +580,7 @@ static int __init dell_init(void)
fail_backlight: fail_backlight:
i8042_remove_filter(dell_laptop_i8042_filter); i8042_remove_filter(dell_laptop_i8042_filter);
cancel_delayed_work_sync(&dell_rfkill_work);
fail_filter: fail_filter:
dell_cleanup_rfkill(); dell_cleanup_rfkill();
fail_rfkill: fail_rfkill:
...@@ -597,12 +598,12 @@ fail_platform_driver: ...@@ -597,12 +598,12 @@ fail_platform_driver:
static void __exit dell_exit(void) static void __exit dell_exit(void)
{ {
cancel_delayed_work_sync(&dell_rfkill_work);
i8042_remove_filter(dell_laptop_i8042_filter); i8042_remove_filter(dell_laptop_i8042_filter);
cancel_delayed_work_sync(&dell_rfkill_work);
backlight_device_unregister(dell_backlight_device); backlight_device_unregister(dell_backlight_device);
dell_cleanup_rfkill(); dell_cleanup_rfkill();
if (platform_device) { if (platform_device) {
platform_device_del(platform_device); platform_device_unregister(platform_device);
platform_driver_unregister(&platform_driver); platform_driver_unregister(&platform_driver);
} }
kfree(da_tokens); kfree(da_tokens);
......
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