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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}