dmaengine: tegra210-adma: Fix runtime PM imbalance on error
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Wed, 24 Jun 2020 06:46:26 +0000 (14:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Jul 2020 14:44:03 +0000 (16:44 +0200)
commit8830292dcf402efb9953aae1a14ff3815c038b05
treea25ff92a0e3aec316a38ab49063baa82a0133708
parentd1893610f6c7632282d904a9eecec695a0254800
dmaengine: tegra210-adma: Fix runtime PM imbalance on error

[ Upstream commit 5b78fac4b1ba731cf4177fdbc1e3a4661521bcd0 ]

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code. Thus a pairing decrement is needed on
the error handling path to keep the counter balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20200624064626.19855-1-dinghao.liu@zju.edu.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/tegra210-adma.c