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)
committerVinod Koul <vkoul@kernel.org>
Wed, 24 Jun 2020 09:41:39 +0000 (15:11 +0530)
commit5b78fac4b1ba731cf4177fdbc1e3a4661521bcd0
treeb7cd13542047172f457b17118ad1cdfe64ff3737
parent8995aa3d164ddd9200e6abcf25c449cf5298c858
dmaengine: tegra210-adma: Fix runtime PM imbalance on error

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>
drivers/dma/tegra210-adma.c