summaryrefslogtreecommitdiffstats
path: root/drivers/usb/typec/tipd
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@kernel.org>2023-04-21 13:17:20 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-13 18:51:09 +0900
commit94ea04ec790887b5b0e43429a92c18a1e692ec08 (patch)
tree9b6d02f9187daadbfb760b5a3cbe98e810dd3913 /drivers/usb/typec/tipd
parent3c0f4f09c063e143822393d99cb2b19a85451c07 (diff)
downloadlinux-stable-94ea04ec790887b5b0e43429a92c18a1e692ec08.tar.gz
linux-stable-94ea04ec790887b5b0e43429a92c18a1e692ec08.tar.bz2
linux-stable-94ea04ec790887b5b0e43429a92c18a1e692ec08.zip
usb: typec: tps6598x: Fix fault at module removal
We need to cancel the delayed workqueue if it is being used else it will cause paging request fault during module removal. Fixes: 0d6a119cecd7 ("usb: typec: tps6598x: Add support for polling interrupts status") Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20230421101720.34318-1-rogerq@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/tipd')
-rw-r--r--drivers/usb/typec/tipd/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 8b075ca82ef6..438cc40660a1 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -886,6 +886,9 @@ static void tps6598x_remove(struct i2c_client *client)
{
struct tps6598x *tps = i2c_get_clientdata(client);
+ if (!client->irq)
+ cancel_delayed_work_sync(&tps->wq_poll);
+
tps6598x_disconnect(tps, 0);
typec_unregister_port(tps->port);
usb_role_switch_put(tps->role_sw);