[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220517130000.28943-1-wupeng58@huawei.com>
Date: Tue, 17 May 2022 13:00:00 +0000
From: Peng Wu <wupeng58@...wei.com>
To: <agross@...nel.org>, <bjorn.andersson@...aro.org>, <kishon@...com>,
<vkoul@...nel.org>
CC: <linux-arm-msm@...r.kernel.org>, <linux-phy@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <wupeng58@...wei.com>,
<liwei391@...wei.com>
Subject: [PATCH] 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.
Signed-off-by: Peng Wu <wupeng58@...wei.com>
---
drivers/phy/qualcomm/phy-qcom-pcie2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-pcie2.c b/drivers/phy/qualcomm/phy-qcom-pcie2.c
index 5407e59bb185..1cc8145e0811 100644
--- a/drivers/phy/qualcomm/phy-qcom-pcie2.c
+++ b/drivers/phy/qualcomm/phy-qcom-pcie2.c
@@ -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;
--
2.17.1
Powered by blists - more mailing lists