phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks

[ Upstream commit 3588060befff75ff39fab7122b94c6fb3148fcda ]

The corresponding API for clk_prepare_enable is clk_disable_unprepare.
Make sure that the clock is unprepared on exit by changing clk_disable
to clk_disable_unprepare.

Fixes: ed31ee7cf1 ("phy: ti: usb2: Fix logic on -EPROBE_DEFER")
Signed-off-by: Miaoqian Lin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
Miaoqian Lin 2022-03-18 10:57:46 +00:00 • committed by Greg Kroah-Hartman
commit dbce8fc16a

View file

@ -157,7 +157,7 @@ static int omap_usb2_enable_clocks(struct omap_usb *phy)
return 0;
err1:
clk_disable(phy->wkupclk);
clk_disable_unprepare(phy->wkupclk);
err0:
return ret;