[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200910113243.46036-1-jingxiangfeng@huawei.com>
Date: Thu, 10 Sep 2020 19:32:43 +0800
From: Jing Xiangfeng <jingxiangfeng@...wei.com>
To: <agross@...nel.org>, <bjorn.andersson@...aro.org>,
<mturquette@...libre.com>, <sboyd@...nel.org>,
<tdas@...eaurora.org>
CC: <linux-arm-msm@...r.kernel.org>, <linux-clk@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <jingxiangfeng@...wei.com>
Subject: [PATCH v2] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe()
lpass_core_sc7180_probe() misses to call pm_clk_destroy() and
pm_runtime_disable() in error paths. Correct goto target to fix it.
This issue is found by code inspection.
Fixes: edab812d802d ("clk: qcom: lpass: Add support for LPASS clock controller for SC7180")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@...wei.com>
---
drivers/clk/qcom/lpasscorecc-sc7180.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/qcom/lpasscorecc-sc7180.c b/drivers/clk/qcom/lpasscorecc-sc7180.c
index d4c1864e1ee9..228d08f5d26f 100644
--- a/drivers/clk/qcom/lpasscorecc-sc7180.c
+++ b/drivers/clk/qcom/lpasscorecc-sc7180.c
@@ -420,17 +420,18 @@ static int lpass_core_sc7180_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
ret = pm_clk_create(&pdev->dev);
if (ret)
- return ret;
+ goto disable_pm_runtime;
ret = pm_clk_add(&pdev->dev, "iface");
if (ret < 0) {
dev_err(&pdev->dev, "failed to acquire iface clock\n");
- goto disable_pm_runtime;
+ goto destroy_pm_clk;
}
+ ret = -EINVAL;
clk_probe = of_device_get_match_data(&pdev->dev);
if (!clk_probe)
- return -EINVAL;
+ goto destroy_pm_clk;
ret = clk_probe(pdev);
if (ret)
--
2.26.0.106.g9fadedd
Powered by blists - more mailing lists