From: Thinh Nguyen Date: Mon, 30 Mar 2020 00:09:59 +0000 (-0700) Subject: usb: dwc3: drd: Don't free non-existing irq X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~1997^2~16^2~74 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=8cc6d55bc20016cc6d81628713114bd807a1e661;p=linux.git usb: dwc3: drd: Don't free non-existing irq 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 Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c index 7db1ffc92bbd..a24c6c038ad7 100644 --- a/drivers/usb/dwc3/drd.c +++ b/drivers/usb/dwc3/drd.c @@ -653,6 +653,6 @@ void dwc3_drd_exit(struct dwc3 *dwc) break; } - if (!dwc->edev) + if (dwc->otg_irq) free_irq(dwc->otg_irq, dwc); }