]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerVinod Koul <vkoul@kernel.org>
Fri, 15 Jul 2022 11:34:25 +0000 (17:04 +0530)
commitf97550a1b4c4d7470d51d53ac4e50329b6b63fb1
tree1e4d4facee6a8d161622f5de70d0250ec6b2d423
parent947ec6d15ed4938e67c1b91600a0f172b178b78f
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: 3bb6c2461fdf ("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>
drivers/phy/st/phy-stm32-usbphyc.c