[PATCH v2 4/4] phy: freescale: fsl-samsung-hdmi: Disable APB clock on resume failure

Can Peng pengcan at kylinos.cn
Mon Jul 20 23:47:52 PDT 2026


fsl_samsung_hdmi_phy_resume() enables apbclk and then reprograms the PHY
when a previous clock configuration is available. If the hardware
configuration fails, the function returns the error with apbclk still
enabled.

Disable apbclk on the failure path so the clock enable count remains
balanced.

Fixes: 6ad082bee902 ("phy: freescale: add Samsung HDMI PHY")
Cc: stable at vger.kernel.org
Signed-off-by: Can Peng <pengcan at kylinos.cn>
---
 drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
index 455d03220b72..bb1aa1977065 100644
--- a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
+++ b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
@@ -722,8 +722,11 @@ static int __maybe_unused fsl_samsung_hdmi_phy_resume(struct device *dev)
 		return ret;
 	}
 
-	if (phy->cur_cfg)
+	if (phy->cur_cfg) {
 		ret = fsl_samsung_hdmi_phy_configure(phy, phy->cur_cfg);
+		if (ret)
+			clk_disable(phy->apbclk);
+	}
 
 	return ret;
 
-- 
2.53.0




More information about the linux-phy mailing list