phy: stm32: fix error return in stm32_usbphyc_phy_init
authorFabrice Gasnier <fabrice.gasnier@foss.st.com>
Wed, 13 Jul 2022 13:39:53 +0000 (15:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:52 +0000 (14:23 +0200)
commit52537ea892a52f935dc02c7ebf8c781291add751
treefa583edd7994e35cdbba289c677681e39e72741a
parent3f2989ed9570853aaf2b35edf96c07827a8b6bc0
phy: stm32: fix error return in stm32_usbphyc_phy_init

[ Upstream commit 32b378a9179ae4db61cfc5d502717214e6cd1e1c ]

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>
Link: https://lore.kernel.org/r/20220713133953.595134-1-fabrice.gasnier@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/st/phy-stm32-usbphyc.c