]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe
authorZhang Shurong <zhang_shurong@foxmail.com>
Thu, 5 Oct 2023 14:28:35 +0000 (22:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2023 10:21:08 +0000 (11:21 +0100)
commit3b6a41708d0c95fcd28f776d12fd3657c5c57ce1
treed2dfb7675f08c9577d5471291334271f13981405
parentf4ba1dc579ee05f8a8dc437bb64f8882b36b7c31
dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe

[ Upstream commit 0618c077a8c20e8c81e367988f70f7e32bb5a717 ]

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context.
We fix it by calling pm_runtime_disable when error returns.

Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/tencent_DD2D371DB5925B4B602B1E1D0A5FA88F1208@qq.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/ste_dma40.c