Skip to content
Commit bbce3c99 authored by Zhang Qilong's avatar Zhang Qilong Committed by Greg Kroah-Hartman
Browse files

dmaengine: stm32-dma: Fix PM usage counter imbalance in stm32 dma ops

[ Upstream commit d54db74a ]

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: 48bc73ba ("dmaengine: stm32-dma: Add PM Runtime support")
Fixes: 05f8740a

 ("dmaengine: stm32-dma: add suspend/resume power management support")
Signed-off-by: default avatarZhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20210607064640.121394-2-zhangqilong3@huawei.com
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 84656b4c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment