mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 07:04:10 +08:00
platform/x86: msi-laptop: Fix resource cleanup
Fix the input-device not getting free-ed on probe-errors and
fix the msi_touchpad_dwork not getting cancelled on neither
probe-errors nor on remove.
Fixes: 143a4c0284
("msi-laptop: send out touchpad on/off key")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220825141336.208597-3-hdegoede@redhat.com
This commit is contained in:
parent
042184ea42
commit
5523632aa1
@ -1106,6 +1106,8 @@ fail_create_attr:
|
||||
fail_create_group:
|
||||
if (quirks->load_scm_model) {
|
||||
i8042_remove_filter(msi_laptop_i8042_filter);
|
||||
cancel_delayed_work_sync(&msi_touchpad_dwork);
|
||||
input_unregister_device(msi_laptop_input_dev);
|
||||
cancel_delayed_work_sync(&msi_rfkill_dwork);
|
||||
rfkill_cleanup();
|
||||
}
|
||||
@ -1125,6 +1127,7 @@ static void __exit msi_cleanup(void)
|
||||
{
|
||||
if (quirks->load_scm_model) {
|
||||
i8042_remove_filter(msi_laptop_i8042_filter);
|
||||
cancel_delayed_work_sync(&msi_touchpad_dwork);
|
||||
input_unregister_device(msi_laptop_input_dev);
|
||||
cancel_delayed_work_sync(&msi_rfkill_dwork);
|
||||
rfkill_cleanup();
|
||||
|
Loading…
Reference in New Issue
Block a user