Patch "mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mfd-arizona-use-pm_runtime_resume_and_get-to-prevent.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 31a31bc655d2c3064fb48d3db9cf7dc4f1900925
Author: Liang He <windhl@xxxxxxx>
Date:   Thu Jan 5 14:10:55 2023 +0800

    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@xxxxxxx>
    Acked-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230105061055.1509261-1-windhl@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index bd7ee3260d53f..c166fcd331f11 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]);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux