phy: rockchip: samsung-hdptx: Consolidate consumer_put on error path

rk_hdptx_phy_consumer_put() is invoked in both branches of the mode
check conditional in rk_hdptx_phy_power_on() on the error path.

Simplify the code by moving the single call to the end of the
function.

No functional change intended.

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://patch.msgid.link/20260811-hdptx-clk-fixes-v6-7-75bca0ee5753@collabora.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
Cristian Ciocaltea 2026-08-11 18:44:48 +03:00 committed by Vinod Koul
parent c2dd42e3eb
commit e49e4bc9f9

View File

@ -1685,8 +1685,6 @@ static int rk_hdptx_phy_power_on(struct phy *phy)
rk_hdptx_dp_pll_init(hdptx);
ret = rk_hdptx_dp_aux_init(hdptx);
if (ret)
rk_hdptx_phy_consumer_put(hdptx, true);
} else {
dev_dbg(hdptx->dev, "%s rate=%llu bpc=%u\n", __func__,
hdptx->hdmi_cfg.rate, hdptx->hdmi_cfg.bpc);
@ -1703,11 +1701,11 @@ static int rk_hdptx_phy_power_on(struct phy *phy)
else
ret = rk_hdptx_tmds_ropll_mode_config(hdptx);
}
if (ret)
rk_hdptx_phy_consumer_put(hdptx, true);
}
if (ret)
rk_hdptx_phy_consumer_put(hdptx, true);
return ret;
}