]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
dmaengine: tegra20: Fix runtime PM imbalance on error
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Fri, 9 Apr 2021 08:28:05 +0000 (16:28 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 May 2021 07:54:12 +0000 (09:54 +0200)
commita7813d6840882d60b07bd3e0fbd05563a6dfa31f
treea29b1b822246029db25f93558e33f6bcfcb2758b
parenta699ed1dad2bee2c4df8da2b71ac7130f7eb33a2
dmaengine: tegra20: Fix runtime PM imbalance on error

BugLink: https://bugs.launchpad.net/bugs/1927535
[ Upstream commit 917a3200b9f467a154999c7572af345f2470aaf4 ]

pm_runtime_get_sync() will increase the runtime PM counter
even it returns an error. Thus a pairing decrement is needed
to prevent refcount leak. Fix this by replacing this API with
pm_runtime_resume_and_get(), which will not change the runtime
PM counter on error.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20210409082805.23643-1-dinghao.liu@zju.edu.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/dma/tegra20-apb-dma.c