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>
Wed, 29 Jul 2020 05:42:55 +0000 (07:42 +0200)
commit7db83a5c004b8a130813985c0ca4fac74a7fa09b
treea5efeeec1242f128ddea11dab9e9a611526d192d
parent5a8f385e1d06c80aa6e006777b9b04414198f039
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