diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-08-02 05:48:55 +0300 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2023-08-03 18:04:30 +0300 |
commit | 4d6e0a1bf8f7a6b44d20162e29a87d0bd9526bb0 (patch) | |
tree | f463f33b19808ec50236dd376e6e0f9bc5cda955 /drivers/soc/qcom | |
parent | 23b45f8aab49f97b0c32bdc6331c0baf7337c48a (diff) | |
download | linux-4d6e0a1bf8f7a6b44d20162e29a87d0bd9526bb0.tar.xz |
soc: qcom: ocmem: add missing clk_disable_unprepare() in ocmem_dev_probe()
Add clk_disable_unprepare(core_clk) when enable iface_clk failed.
Fixes: a7e12e7bda08 ("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>
Diffstat (limited to 'drivers/soc/qcom')
-rw-r--r-- | drivers/soc/qcom/ocmem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c index 6edc18b211aa..20f5461d46b9 100644 --- a/drivers/soc/qcom/ocmem.c +++ b/drivers/soc/qcom/ocmem.c @@ -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"); |