[PATCH v2 4/4] phy: freescale: fsl-samsung-hdmi: Disable APB clock on resume failure
From: Can Peng
Date: Tue Jul 21 2026 - 02:57:56 EST
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@xxxxxxxxxxxxxxx
Signed-off-by: Can Peng <pengcan@xxxxxxxxxx>
---
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