[PATCH] memory: mtk-smi: Fix PM usage counter unbalance in mtk_smi ops

Krzysztof Kozlowski krzk at kernel.org
Sun Jan 3 11:32:19 EST 2021


On Mon, Nov 23, 2020 at 06:21:18PM +0800, Zhang Qilong wrote:
> 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: 4f0a1a1ae3519 ("memory: mtk-smi: Invoke pm runtime_callback to enable clocks")
> Signed-off-by: Zhang Qilong <zhangqilong3 at huawei.com>
> ---
>  drivers/memory/mtk-smi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, applied.

Best regards,
Krzysztof




More information about the Linux-mediatek mailing list