Commit 4d6e0a1b authored by Yang Yingliang's avatar Yang Yingliang Committed by Bjorn Andersson

soc: qcom: ocmem: add missing clk_disable_unprepare() in ocmem_dev_probe()

Add clk_disable_unprepare(core_clk) when enable iface_clk failed.

Fixes: a7e12e7b ("soc: qcom: ocmem: make iface clock optional")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230802024855.2521895-1-yangyingliang@huawei.comSigned-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent 23b45f8a
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment