Commit aa37448f authored by Zhang Qilong's avatar Zhang Qilong Committed by Bjorn Andersson

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: dc160e44 ("remoteproc: qcom: Introduce Non-PAS ADSP PIL driver")
Signed-off-by: default avatarZhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20201102143534.144484-1-zhangqilong3@huawei.comSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent a2472305
...@@ -193,8 +193,10 @@ static int adsp_start(struct rproc *rproc) ...@@ -193,8 +193,10 @@ static int adsp_start(struct rproc *rproc)
dev_pm_genpd_set_performance_state(adsp->dev, INT_MAX); dev_pm_genpd_set_performance_state(adsp->dev, INT_MAX);
ret = pm_runtime_get_sync(adsp->dev); ret = pm_runtime_get_sync(adsp->dev);
if (ret) if (ret) {
pm_runtime_put_noidle(adsp->dev);
goto disable_xo_clk; goto disable_xo_clk;
}
ret = clk_bulk_prepare_enable(adsp->num_clks, adsp->clks); ret = clk_bulk_prepare_enable(adsp->num_clks, adsp->clks);
if (ret) { if (ret) {
......
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