mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak
authorLiang He <windhl@126.com>
Thu, 5 Jan 2023 06:10:55 +0000 (14:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:57:32 +0000 (13:57 +0100)
commit5a47bb71b1a94a279144fc3031d3c4591b38dd16
treea484163f28920beb1a6ac03856d2db4572cf1cb9
parent1b46c2a76c2164ee9b2ff8f336afb0d143245d55
mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak

[ Upstream commit 4414a7ab80cebf715045e3c4d465feefbad21139 ]

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: Liang He <windhl@126.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230105061055.1509261-1-windhl@126.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/arizona-core.c