diff options
| author | Zhang Qilong <zhangqilong3@huawei.com> | 2020-11-02 22:35:34 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-30 11:51:24 +0100 |
| commit | 6f597c451e07779f58ed271d6a17c6c2079d5456 (patch) | |
| tree | 1338d5d10ceff0411a748b7f32354807d950561f /drivers/remoteproc | |
| parent | f61bce4bc8336b4fc75dce777be6462f0d981872 (diff) | |
| download | linux-6f597c451e07779f58ed271d6a17c6c2079d5456.tar.gz linux-6f597c451e07779f58ed271d6a17c6c2079d5456.tar.bz2 linux-6f597c451e07779f58ed271d6a17c6c2079d5456.zip | |
remoteproc: qcom: fix reference leak in adsp_start
[ Upstream commit aa37448f597c09844942da87d042fc6793f989c2 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/remoteproc')
| -rw-r--r-- | drivers/remoteproc/qcom_q6v5_adsp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index e953886b2eb7..cd88ceabf03e 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -184,8 +184,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) { |
