Commit 94ea04ec authored by Roger Quadros's avatar Roger Quadros Committed by Greg Kroah-Hartman

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: 0d6a119c ("usb: typec: tps6598x: Add support for polling interrupts status")
Signed-off-by: default avatarRoger Quadros <rogerq@kernel.org>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20230421101720.34318-1-rogerq@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3c0f4f09
...@@ -886,6 +886,9 @@ static void tps6598x_remove(struct i2c_client *client) ...@@ -886,6 +886,9 @@ static void tps6598x_remove(struct i2c_client *client)
{ {
struct tps6598x *tps = i2c_get_clientdata(client); struct tps6598x *tps = i2c_get_clientdata(client);
if (!client->irq)
cancel_delayed_work_sync(&tps->wq_poll);
tps6598x_disconnect(tps, 0); tps6598x_disconnect(tps, 0);
typec_unregister_port(tps->port); typec_unregister_port(tps->port);
usb_role_switch_put(tps->role_sw); usb_role_switch_put(tps->role_sw);
......
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