]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
usb: dwc3: Fix error handling for core init
authorVivek Gautam <vivek.gautam@codeaurora.org>
Fri, 21 Oct 2016 10:51:07 +0000 (16:21 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Nov 2016 09:51:47 +0000 (10:51 +0100)
commit 9b9d7cdd0a20a8c26a022604580f93516ad69c36 upstream.

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.

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>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c

index 35d092456bec1da828ea41476e421d47809380a5..2d47010e55afe48e60e9ad9d7d8a550158da745c 100644 (file)
@@ -669,15 +669,14 @@ static int dwc3_core_init(struct dwc3 *dwc)
        return 0;
 
 err4:
-       phy_power_off(dwc->usb2_generic_phy);
+       phy_power_off(dwc->usb3_generic_phy);
 
 err3:
-       phy_power_off(dwc->usb3_generic_phy);
+       phy_power_off(dwc->usb2_generic_phy);
 
 err2:
        usb_phy_set_suspend(dwc->usb2_phy, 1);
        usb_phy_set_suspend(dwc->usb3_phy, 1);
-       dwc3_core_exit(dwc);
 
 err1:
        usb_phy_shutdown(dwc->usb2_phy);