Skip to contentSkip to conversation

phy: qcom: fix missing clk_disable_unprepare() on err in qcom_pcie2_phy_power_on

PATCH New Peng Wu 1 participant 1 message May 17, 2022

Subsystems (2)
lore
Share & tools
lore

Peng Wu

author
#0 lore raw

PATCH 1/1 phy: qcom: fix missing clk_disable_unprepare() on err in qcom_pcie2_phy_power_on

Fix the missing clk_disable_unprepare() before return from qcom_pcie2_phy_power_on() in the error handling case.

---
 drivers/phy/qualcomm/phy-qcom-pcie2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/phy/qualcomm/phy-qcom-pcie2.c +3 -1
index 5407e59bb185..1cc8145e0811 100644
@@ -162,8 +162,10 @@ static int qcom_pcie2_phy_power_on(struct phy *phy)
 
 	ret = readl_poll_timeout(qphy->base + PCIE20_PARF_PHY_STTS, val,
 				 !(val & BIT(0)), 1000, 10);
-	if (ret)
+	if (ret) {
+		clk_disable_unprepare(qphy->pipe_clk);
 		dev_err(qphy->dev, "phy initialization failed\n");
+	}
 
 out:
 	return ret;
Signature · 1 line
2.17.1