diff options
author | Thinh Nguyen <Thinh.Nguyen@synopsys.com> | 2020-03-30 03:09:59 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-05-05 11:00:12 +0300 |
commit | 8cc6d55bc20016cc6d81628713114bd807a1e661 (patch) | |
tree | 93987acaf83eb4b847a6cd0e32b27fd775a4fac8 /drivers/usb/dwc3 | |
parent | 31306821d87723d63f1be6908c7187719f282eff (diff) | |
download | linux-8cc6d55bc20016cc6d81628713114bd807a1e661.tar.xz |
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/dwc3')
-rw-r--r-- | drivers/usb/dwc3/drd.c | 2 |
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); } |