aboutsummaryrefslogtreecommitdiff
path: root/drivers/remoteproc/qcom_q6v5_adsp.c
diff options
context:
space:
mode:
authorZhang Qilong <zhangqilong3@huawei.com>2020-11-02 22:35:34 +0800
committerBjorn Andersson <bjorn.andersson@linaro.org>2020-12-10 13:23:14 -0600
commitaa37448f597c09844942da87d042fc6793f989c2 (patch)
treef509581ac897638f1e1eeb170380241b931f2550 /drivers/remoteproc/qcom_q6v5_adsp.c
parenta24723050037303e4008b37f1f8dcc99c58901aa (diff)
downloadlinux-aa37448f597c09844942da87d042fc6793f989c2.tar.gz
remoteproc: qcom: fix reference leak in adsp_start
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in adsp_start, so we should fix it. Fixes: dc160e4491222 ("remoteproc: qcom: Introduce Non-PAS ADSP PIL driver") Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Link: https://lore.kernel.org/r/20201102143534.144484-1-zhangqilong3@huawei.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/qcom_q6v5_adsp.c')
-rw-r--r--drivers/remoteproc/qcom_q6v5_adsp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c
index 9db0380236e7..2f8f38408eb7 100644
--- a/drivers/remoteproc/qcom_q6v5_adsp.c
+++ b/drivers/remoteproc/qcom_q6v5_adsp.c
@@ -193,8 +193,10 @@ static int adsp_start(struct rproc *rproc)
dev_pm_genpd_set_performance_state(adsp->dev, INT_MAX);
ret = pm_runtime_get_sync(adsp->dev);
- if (ret)
+ if (ret) {
+ pm_runtime_put_noidle(adsp->dev);
goto disable_xo_clk;
+ }
ret = clk_bulk_prepare_enable(adsp->num_clks, adsp->clks);
if (ret) {