Message ID | c2892b14b915f3e8bd7df91cd44f126abd887bd2.1585526614.git.thinhn@synopsys.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 8cc6d55bc20016cc6d81628713114bd807a1e661 |
Headers | show |
Series | usb: dwc3: gadget: Default mode for DRD | expand |
diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c index db68d48c2267..e6ec01972029 100644 --- a/drivers/usb/dwc3/drd.c +++ b/drivers/usb/dwc3/drd.c @@ -651,6 +651,6 @@ void dwc3_drd_exit(struct dwc3 *dwc) break; } - if (!dwc->edev) + if (dwc->otg_irq) free_irq(dwc->otg_irq, dwc); }
If the driver is configured to use DRD role-switch, it's not OTG. There won't be OTG irq to free. Check for dwc->otg_irq before freeing it. Signed-off-by: Thinh Nguyen <thinhn@synopsys.com> --- drivers/usb/dwc3/drd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)