Skip to content

Commit d2249bf

Browse files
hiss2018bebarino
authored andcommitted
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. Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Link: https://lore.kernel.org/r/20200827141629.101802-1-jingxiangfeng@huawei.com Fixes: edab812 ("clk: qcom: lpass: Add support for LPASS clock controller for SC7180") Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent da9c43d commit d2249bf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/clk/qcom/lpasscorecc-sc7180.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,17 +420,18 @@ static int lpass_core_sc7180_probe(struct platform_device *pdev)
420420
pm_runtime_enable(&pdev->dev);
421421
ret = pm_clk_create(&pdev->dev);
422422
if (ret)
423-
return ret;
423+
goto disable_pm_runtime;
424424

425425
ret = pm_clk_add(&pdev->dev, "iface");
426426
if (ret < 0) {
427427
dev_err(&pdev->dev, "failed to acquire iface clock\n");
428-
goto disable_pm_runtime;
428+
goto destroy_pm_clk;
429429
}
430430

431+
ret = -EINVAL;
431432
clk_probe = of_device_get_match_data(&pdev->dev);
432433
if (!clk_probe)
433-
return -EINVAL;
434+
goto destroy_pm_clk;
434435

435436
ret = clk_probe(pdev);
436437
if (ret)

0 commit comments

Comments
 (0)