[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220713133953.595134-1-fabrice.gasnier@foss.st.com>
Date: Wed, 13 Jul 2022 15:39:53 +0200
From: Fabrice Gasnier <fabrice.gasnier@...s.st.com>
To: <vkoul@...nel.org>, <kishon@...com>
CC: <amelie.delaunay@...s.st.com>, <alexandre.torgue@...s.st.com>,
<linux-phy@...ts.infradead.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] phy: stm32: fix error return in stm32_usbphyc_phy_init
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@...s.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
Powered by blists - more mailing lists