mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 10:12:16 +09:00
usb: dwc3: Undo PHY init if soft reset fails
[ Upstream commit 00b42170c8 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0cc948e8dd
commit
e8f101ec20
@@ -248,6 +248,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user