summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/core.c
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2018-01-17 13:22:49 -0800
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-02-12 10:49:49 +0200
commit00b42170c86f90ac9dea83a7dfcd3f0c38098fe2 (patch)
tree59a5b1082301936780af637d155eac32d11e62ed /drivers/usb/dwc3/core.c
parent8813a59ed892305b5ac1b5b901740b1ad4b5fefa (diff)
downloadop-kernel-dev-00b42170c86f90ac9dea83a7dfcd3f0c38098fe2.zip
op-kernel-dev-00b42170c86f90ac9dea83a7dfcd3f0c38098fe2.tar.gz
usb: dwc3: Undo PHY init if soft reset fails
In this function, we init the USB2 and USB3 PHYs, but if soft reset times out, we don't unwind this. Noticed by inspection. Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r--drivers/usb/dwc3/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index ade2ab0..bc2467f 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -234,6 +234,9 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc)
udelay(1);
} while (--retries);
+ phy_exit(dwc->usb3_generic_phy);
+ phy_exit(dwc->usb2_generic_phy);
+
return -ETIMEDOUT;
}
OpenPOWER on IntegriCloud