[PATCH -next v2] dmaengine: mediatek:Fix PM usage reference leak of mtk_uart_apdma_alloc_chan_resources
Vinod Koul
vkoul at kernel.org
Mon Apr 11 07:21:44 PDT 2022
On 19-03-22, 10:21, Zhang Qilong wrote:
> From: zhangqilong <zhangqilong3 at huawei.com>
>
> 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:
> 1) Replacing it with pm_runtime_resume_and_get to keep usage counter
> balanced.
> 2) Add putting operation before returning error.
Applied, thanks
--
~Vinod
More information about the Linux-mediatek
mailing list