public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: Fix error handling for core init
@ 2016-10-21  6:17 Vivek Gautam
  2016-10-21 10:15 ` Felipe Balbi
  0 siblings, 1 reply; 4+ messages in thread
From: Vivek Gautam @ 2016-10-21  6:17 UTC (permalink / raw)
  To: balbi, gregkh; +Cc: linux-usb, linux-kernel, Vivek Gautam, Felipe Balbi

Fixing the sequence of events in dwc3_core_init() error exit path.
dwc3_core_exit() call is removed from the error path since,
whatever it's doing is already done.

Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
---

Based on usb-next.

 drivers/usb/dwc3/core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 7287a76..fea4469 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -769,15 +769,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);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-21 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-21  6:17 [PATCH] usb: dwc3: Fix error handling for core init Vivek Gautam
2016-10-21 10:15 ` Felipe Balbi
2016-10-21 10:24   ` Vivek Gautam
2016-10-21 10:51     ` [PATCH v2] " Vivek Gautam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox