mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
usb: typec: anx7411 - stop the IRQ before destroying the workqueue
The IRQ is devm-managed, so it can still queue plat->work while
remove() is tearing the queue down. Disable it first.
Fixes: fe6d8a9c8e ("usb: typec: anx7411: Add Analogix PD ANX7411 support")
Cc: stable <stable@kernel.org>
Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260910011150.2966843-1-gonglinkai@kylinos.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
98d00deb6a
commit
469600d5d2
|
|
@ -1566,8 +1566,11 @@ static void anx7411_i2c_remove(struct i2c_client *client)
|
|||
anx7411_partner_unregister_altmode(plat);
|
||||
anx7411_unregister_partner(plat);
|
||||
|
||||
if (plat->workqueue)
|
||||
if (plat->workqueue) {
|
||||
disable_irq(plat->intp_irq);
|
||||
cancel_work_sync(&plat->work);
|
||||
destroy_workqueue(plat->workqueue);
|
||||
}
|
||||
|
||||
i2c_unregister_device(plat->spi_client);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user