Skip to content

Commit 35cc344

Browse files
vivekgautam1rkhuangtao
authored andcommitted
UPSTREAM: usb: dwc3: Fix error handling for core init
Fixing the sequence of events in dwc3_core_init() error exit path. dwc3_core_exit() call is also removed from the error path since, whatever it's doing is already done. Change-Id: I71f6aab189df0e5223d490fb6eaeebe1481a6b65 Fixes: c499ff7 usb: dwc3: core: re-factor init and exit paths Cc: Felipe Balbi <felipe.balbi@linux.intel.com> Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Stable <stable@vger.kernel.org> # 4.8+ Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 9b9d7cdd0a20a8c26a022604580f93516ad69c36)
1 parent 25b4c02 commit 35cc344

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/usb/dwc3/core.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -718,15 +718,14 @@ static int dwc3_core_init(struct dwc3 *dwc)
718718
return 0;
719719

720720
err4:
721-
phy_power_off(dwc->usb2_generic_phy);
721+
phy_power_off(dwc->usb3_generic_phy);
722722

723723
err3:
724-
phy_power_off(dwc->usb3_generic_phy);
724+
phy_power_off(dwc->usb2_generic_phy);
725725

726726
err2:
727727
usb_phy_set_suspend(dwc->usb2_phy, 1);
728728
usb_phy_set_suspend(dwc->usb3_phy, 1);
729-
dwc3_core_exit(dwc);
730729

731730
err1:
732731
usb_phy_shutdown(dwc->usb2_phy);

0 commit comments

Comments
 (0)