[PATCH v3 1/3] phy: exynos5-usbdrd: power the Exynos2200 phy down when its init fails

Manivannan Sadhasivam mani at kernel.org
Fri Nov 27 05:51:18 PST 2026


On 2026-11-14 06:44 +0000, Soheyb Boulaa wrote:
> exynos2200_usbdrd_phy_init() enables the regulators of the UTMI phy and
> takes the phy out of isolation in the PMU before it enables the clocks.
> When clk_bulk_prepare_enable() fails, it returns without undoing
> either. The phy core does not count a failed init, so no exit undoes
> them later: the phy stays out of isolation, and its supplies stay
> enabled, until an init and an exit succeed.
> 
> Isolate the phy again and disable the UTMI regulators when the clocks
> or the phy-specific init fail. The phy-specific init does not fail yet;
> the next patch makes the UTMI init return the result of the init of the

Then add the error handling in next patch.

> high-speed phy.
> 
> Fixes: cc52a697f87e ("phy: exynos5-usbdrd: support Exynos USBDRD 3.2 4nm controller")
> Cc: stable at vger.kernel.org

This patch is not a critical fix to backport. Please drop the tag.

> Signed-off-by: Soheyb Boulaa <soheyb_boulaa at proton.me>

> ---
> v3: full name in From and Signed-off-by.
> v2: new patch.
> 
>  drivers/phy/samsung/phy-exynos5-usbdrd.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> index 087d552..a6fe779 100644
> --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
> +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> @@ -1462,7 +1462,7 @@ static int exynos2200_usbdrd_phy_init(struct phy *phy)
>  
>  	ret = clk_bulk_prepare_enable(phy_drd->drv_data->n_clks, phy_drd->clks);
>  	if (ret)
> -		return ret;
> +		goto power_down;
>  
>  	/* Set up the link controller */
>  	exynos2200_usbdrd_link_init(phy_drd);
> @@ -1475,6 +1475,17 @@ static int exynos2200_usbdrd_phy_init(struct phy *phy)
>  
>  	clk_bulk_disable_unprepare(phy_drd->drv_data->n_clks, phy_drd->clks);
>  
> +	if (ret)
> +		goto power_down;

Is there a logic in doing the error check here?

- Mani





More information about the linux-arm-kernel mailing list