* [PATCH] phy: stm32: fix error return in stm32_usbphyc_phy_init
@ 2022-07-13 13:39 Fabrice Gasnier
2022-07-15 11:34 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Gasnier @ 2022-07-13 13:39 UTC (permalink / raw)
To: vkoul, kishon
Cc: amelie.delaunay, alexandre.torgue, linux-phy, linux-stm32,
linux-arm-kernel, linux-kernel
Error code is overridden, in case the PLL doesn't lock. So, the USB
initialization can continue. This leads to a platform freeze.
This can be avoided by returning proper error code to avoid USB probe
freezing the platform. It also displays proper errors in log.
Fixes: 5b1af71280ab ("phy: stm32: rework PLL Lock detection")
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
drivers/phy/st/phy-stm32-usbphyc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-usbphyc.c
index 007a23c78d562..a98c911cc37ae 100644
--- a/drivers/phy/st/phy-stm32-usbphyc.c
+++ b/drivers/phy/st/phy-stm32-usbphyc.c
@@ -358,7 +358,9 @@ static int stm32_usbphyc_phy_init(struct phy *phy)
return 0;
pll_disable:
- return stm32_usbphyc_pll_disable(usbphyc);
+ stm32_usbphyc_pll_disable(usbphyc);
+
+ return ret;
}
static int stm32_usbphyc_phy_exit(struct phy *phy)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] phy: stm32: fix error return in stm32_usbphyc_phy_init
2022-07-13 13:39 [PATCH] phy: stm32: fix error return in stm32_usbphyc_phy_init Fabrice Gasnier
@ 2022-07-15 11:34 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2022-07-15 11:34 UTC (permalink / raw)
To: Fabrice Gasnier
Cc: kishon, amelie.delaunay, alexandre.torgue, linux-phy,
linux-stm32, linux-arm-kernel, linux-kernel
On 13-07-22, 15:39, Fabrice Gasnier wrote:
> Error code is overridden, in case the PLL doesn't lock. So, the USB
> initialization can continue. This leads to a platform freeze.
> This can be avoided by returning proper error code to avoid USB probe
> freezing the platform. It also displays proper errors in log.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-15 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13 13:39 [PATCH] phy: stm32: fix error return in stm32_usbphyc_phy_init Fabrice Gasnier
2022-07-15 11:34 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).