Skip to contentSkip to conversation

usb: musb: Cancel delayed work on host controller rmmod

PATCH New Tony Lindgren 1 participant 1 message Sep 15, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: musb: Cancel delayed work on host controller rmmod

If we rmmod the musb host controller with gadgets configured, musb_gadget_stop() gets called. We need to also flush the delayed work.

Fixes 2bff3916fda9 ("usb: musb: Fix PM for hub disconnect")
---
 drivers/usb/musb/musb_gadget.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/musb/musb_gadget.c +1 -0
@@ -1910,6 +1910,7 @@ static int musb_gadget_stop(struct usb_gadget *g)
 
 	/* Force check of devctl register for PM runtime */
 	schedule_delayed_work(&musb->irq_work, 0);
+	flush_delayed_work(&musb->irq_work);
 
 	pm_runtime_mark_last_busy(musb->controller);
 	pm_runtime_put_autosuspend(musb->controller);
Signature · 1 line
2.23.0