Skip to content

Commit

Permalink
soc: qcom: ocmem: add missing clk_disable_unprepare() in ocmem_dev_pr…
Browse files Browse the repository at this point in the history
…obe()

Add clk_disable_unprepare(core_clk) when enable iface_clk failed.

Fixes: a7e12e7 ("soc: qcom: ocmem: make iface clock optional")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230802024855.2521895-1-yangyingliang@huawei.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
  • Loading branch information
Yang Yingliang authored and Bjorn Andersson committed Aug 3, 2023
1 parent 23b45f8 commit 4d6e0a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/soc/qcom/ocmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,10 @@ static int ocmem_dev_probe(struct platform_device *pdev)
return dev_err_probe(ocmem->dev, ret, "Failed to enable core clock\n");

ret = clk_prepare_enable(ocmem->iface_clk);
if (ret)
if (ret) {
clk_disable_unprepare(ocmem->core_clk);
return dev_err_probe(ocmem->dev, ret, "Failed to enable iface clock\n");
}

if (qcom_scm_restore_sec_cfg_available()) {
dev_dbg(dev, "configuring scm\n");
Expand Down

0 comments on commit 4d6e0a1

Please sign in to comment.