usb: dwc3: power off usb phy in error path
authorKishon Vijay Abraham I <kishon@ti.com>
Mon, 25 Nov 2013 10:01:22 +0000 (15:31 +0530)
committerFelipe Balbi <balbi@ti.com>
Mon, 25 Nov 2013 21:15:52 +0000 (15:15 -0600)
usb phy was power'ed on but was never power'ed off in the error path.
Fix it.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/core.c

index 4dd1f7e2edc8a7eff37c141f3533edfc98b4506f..a49217ae35333846bb76912666f0efa12bca6813 100644 (file)
@@ -569,6 +569,8 @@ err2:
        dwc3_event_buffers_cleanup(dwc);
 
 err1:
+       usb_phy_set_suspend(dwc->usb2_phy, 1);
+       usb_phy_set_suspend(dwc->usb3_phy, 1);
        dwc3_core_exit(dwc);
 
 err0: