Skip to content

Commit 94ea04e

Browse files
rogerqgregkh
authored andcommitted
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: 0d6a119 ("usb: typec: tps6598x: Add support for polling interrupts status") Signed-off-by: Roger Quadros <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3c0f4f0 commit 94ea04e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/usb/typec/tipd/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,9 @@ static void tps6598x_remove(struct i2c_client *client)
886886
{
887887
struct tps6598x *tps = i2c_get_clientdata(client);
888888

889+
if (!client->irq)
890+
cancel_delayed_work_sync(&tps->wq_poll);
891+
889892
tps6598x_disconnect(tps, 0);
890893
typec_unregister_port(tps->port);
891894
usb_role_switch_put(tps->role_sw);

0 commit comments

Comments
 (0)