Commit b61a3076 authored by Liang He's avatar Liang He Committed by sanglipeng
Browse files

mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak

stable inclusion
from stable-v5.10.173
commit 754e81ff44061dda68da0fd4ef51bd1aa9fbf2cf
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7X0QU

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



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

[ Upstream commit 4414a7ab ]

In arizona_clk32k_enable(), we should use pm_runtime_resume_and_get()
as pm_runtime_get_sync() will increase the refcnt even when it
returns an error.

Signed-off-by: default avatarLiang He <windhl@126.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230105061055.1509261-1-windhl@126.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 0b865934
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment