Commit 33f22014 authored by Zhang Qilong's avatar Zhang Qilong Committed by Zheng Zengkai
Browse files

dmaengine: stm32-dmamux: Fix PM usage counter unbalance in stm32 dmamux ops

stable inclusion
from stable-5.10.58
commit 281514da66a4ce121bd071240ce7c5aa4e9f6bdf
bugzilla: 176984 https://gitee.com/openeuler/kernel/issues/I4E2P4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=281514da66a4ce121bd071240ce7c5aa4e9f6bdf



--------------------------------

[ Upstream commit baa16371 ]

pm_runtime_get_sync will increment pm usage counter
even it failed. Forgetting to putting operation will
result in reference leak here. We fix it by replacing
it with pm_runtime_resume_and_get to keep usage counter
balanced.

Fixes: 4f3ceca2 ("dmaengine: stm32-dmamux: Add PM Runtime support")
Signed-off-by: default avatarZhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20210607064640.121394-3-zhangqilong3@huawei.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 7a5b9e03
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment