summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2023-01-05 14:10:55 +0800
committerLee Jones <lee@kernel.org>2023-02-22 08:25:53 +0000
commit4414a7ab80cebf715045e3c4d465feefbad21139 (patch)
tree88ff216954157ff756b2f2d77fc7133d8fe42bca /drivers
parent7d1e3bd94828ad9fc86f55253cd6fec8edd65394 (diff)
mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/arizona-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index bd7ee3260d53..c166fcd331f1 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -45,7 +45,7 @@ int arizona_clk32k_enable(struct arizona *arizona)
if (arizona->clk32k_ref == 1) {
switch (arizona->pdata.clk32k_src) {
case ARIZONA_32KZ_MCLK1:
- ret = pm_runtime_get_sync(arizona->dev);
+ ret = pm_runtime_resume_and_get(arizona->dev);
if (ret != 0)
goto err_ref;
ret = clk_prepare_enable(arizona->mclk[ARIZONA_MCLK1]);