summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>2020-03-29 17:09:59 -0700
committerFelipe Balbi <balbi@kernel.org>2020-05-05 11:00:12 +0300
commit8cc6d55bc20016cc6d81628713114bd807a1e661 (patch)
tree93987acaf83eb4b847a6cd0e32b27fd775a4fac8 /drivers/usb
parent31306821d87723d63f1be6908c7187719f282eff (diff)
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 <thinhn@synopsys.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc3/drd.c2
1 files changed, 1 insertions, 1 deletions
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);
}