Commit 8cc6d55b authored by Thinh Nguyen's avatar Thinh Nguyen Committed by Felipe Balbi

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: default avatarThinh Nguyen <thinhn@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 31306821
...@@ -653,6 +653,6 @@ void dwc3_drd_exit(struct dwc3 *dwc) ...@@ -653,6 +653,6 @@ void dwc3_drd_exit(struct dwc3 *dwc)
break; break;
} }
if (!dwc->edev) if (dwc->otg_irq)
free_irq(dwc->otg_irq, dwc); free_irq(dwc->otg_irq, dwc);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment