From: Hans de Goede <hdegoede@redhat.com>
To: Mark Gross <markgross@kernel.org>, Andy Shevchenko <andy@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>, platform-driver-x86@vger.kernel.org
Subject: [PATCH 3/3] platform/x86: msi-laptop: Fix resource cleanup
Date: Thu, 25 Aug 2022 16:13:36 +0200 [thread overview]
Message-ID: <20220825141336.208597-3-hdegoede@redhat.com> (raw)
In-Reply-To: <20220825141336.208597-1-hdegoede@redhat.com>
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.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/platform/x86/msi-laptop.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
index 65db18c6e3e8..5d4b10b8d771 100644
--- a/drivers/platform/x86/msi-laptop.c
+++ b/drivers/platform/x86/msi-laptop.c
@@ -1106,6 +1106,8 @@ static int __init msi_init(void)
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();
--
2.37.2
next prev parent reply other threads:[~2022-08-25 14:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 14:13 [PATCH 1/3] platform/x86: msi-laptop: Fix old-ec check for backlight registering Hans de Goede
2022-08-25 14:13 ` [PATCH 2/3] platform/x86: msi-laptop: Simplify ec_delay handling Hans de Goede
2022-08-25 15:05 ` Andy Shevchenko
2022-08-25 15:30 ` Hans de Goede
2022-08-25 14:13 ` Hans de Goede [this message]
2022-08-25 15:05 ` [PATCH 3/3] platform/x86: msi-laptop: Fix resource cleanup Andy Shevchenko
2022-08-25 15:37 ` Hans de Goede
2022-08-25 15:04 ` [PATCH 1/3] platform/x86: msi-laptop: Fix old-ec check for backlight registering Andy Shevchenko
2022-08-26 11:17 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220825141336.208597-3-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy@kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.