linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe()
@ 2020-08-27 14:16 Jing Xiangfeng
  2020-09-10  9:03 ` Stephen Boyd
  2020-09-10 20:43 ` Stephen Boyd
  0 siblings, 2 replies; 4+ messages in thread
From: Jing Xiangfeng @ 2020-08-27 14:16 UTC (permalink / raw)
  To: agross, bjorn.andersson, mturquette, sboyd, tdas
  Cc: linux-arm-msm, linux-clk, linux-kernel, jingxiangfeng

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.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe()
  2020-08-27 14:16 [PATCH] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe() Jing Xiangfeng
@ 2020-09-10  9:03 ` Stephen Boyd
  2020-09-10  9:28   ` Jing Xiangfeng
  2020-09-10 20:43 ` Stephen Boyd
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2020-09-10  9:03 UTC (permalink / raw)
  To: Jing Xiangfeng, agross, bjorn.andersson, mturquette, tdas
  Cc: linux-arm-msm, linux-clk, linux-kernel, jingxiangfeng

Quoting Jing Xiangfeng (2020-08-27 07:16:29)
> 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.
> 
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
> ---

HMm.. presumably

Fixes: edab812d802d ("clk: qcom: lpass: Add support for LPASS clock controller for SC7180")

should be added?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe()
  2020-09-10  9:03 ` Stephen Boyd
@ 2020-09-10  9:28   ` Jing Xiangfeng
  0 siblings, 0 replies; 4+ messages in thread
From: Jing Xiangfeng @ 2020-09-10  9:28 UTC (permalink / raw)
  To: Stephen Boyd, agross, bjorn.andersson, mturquette, tdas
  Cc: linux-arm-msm, linux-clk, linux-kernel



On 2020/9/10 17:03, Stephen Boyd wrote:
> Quoting Jing Xiangfeng (2020-08-27 07:16:29)
>> 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.
>>
>> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
>> ---
>
> HMm.. presumably
>
> Fixes: edab812d802d ("clk: qcom: lpass: Add support for LPASS clock controller for SC7180")
>
> should be added?

Ok, I will send a v2 with it.
	Thanks
> .
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe()
  2020-08-27 14:16 [PATCH] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe() Jing Xiangfeng
  2020-09-10  9:03 ` Stephen Boyd
@ 2020-09-10 20:43 ` Stephen Boyd
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2020-09-10 20:43 UTC (permalink / raw)
  To: Jing Xiangfeng, agross, bjorn.andersson, mturquette, tdas
  Cc: linux-arm-msm, linux-clk, linux-kernel, jingxiangfeng

Quoting Jing Xiangfeng (2020-08-27 07:16:29)
> 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.
> 
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
> ---

Applied to clk-fixes

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-10 20:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 14:16 [PATCH] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe() Jing Xiangfeng
2020-09-10  9:03 ` Stephen Boyd
2020-09-10  9:28   ` Jing Xiangfeng
2020-09-10 20:43 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).