Skip to content

Commit 4414a7a

Browse files
windhllag-linaro
authored andcommitted
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 <[email protected]> Acked-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7d1e3bd commit 4414a7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mfd/arizona-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ int arizona_clk32k_enable(struct arizona *arizona)
4545
if (arizona->clk32k_ref == 1) {
4646
switch (arizona->pdata.clk32k_src) {
4747
case ARIZONA_32KZ_MCLK1:
48-
ret = pm_runtime_get_sync(arizona->dev);
48+
ret = pm_runtime_resume_and_get(arizona->dev);
4949
if (ret != 0)
5050
goto err_ref;
5151
ret = clk_prepare_enable(arizona->mclk[ARIZONA_MCLK1]);

0 commit comments

Comments
 (0)