Patch "irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()" has been added to the 4.9-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

    irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()

to the 4.9-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:
     irqchip-gic-pm-use-pm_runtime_resume_and_get-in-gic_.patch
and it can be found in the queue-4.9 subdirectory.

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



commit 87bd286f9b7a567cbe27c7b62f3f02ca81efd104
Author: Shang XiaoJing <shangxiaojing@xxxxxxxxxx>
Date:   Thu Nov 24 14:51:50 2022 +0800

    irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
    
    [ Upstream commit f9ee20c85b3a3ba0afd3672630ec4f93d339f015 ]
    
    gic_probe() calls pm_runtime_get_sync() and added fail path as
    rpm_put to put usage_counter. However, pm_runtime_get_sync()
    will increment usage_counter even it failed. Fix it by replacing it with
    pm_runtime_resume_and_get() to keep usage counter balanced.
    
    Fixes: 9c8edddfc992 ("irqchip/gic: Add platform driver for non-root GICs that require RPM")
    Signed-off-by: Shang XiaoJing <shangxiaojing@xxxxxxxxxx>
    Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221124065150.22809-1-shangxiaojing@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/irqchip/irq-gic-pm.c b/drivers/irqchip/irq-gic-pm.c
index ecafd295c31c..21c5decfc55b 100644
--- a/drivers/irqchip/irq-gic-pm.c
+++ b/drivers/irqchip/irq-gic-pm.c
@@ -112,7 +112,7 @@ static int gic_probe(struct platform_device *pdev)
 
 	pm_runtime_enable(dev);
 
-	ret = pm_runtime_get_sync(dev);
+	ret = pm_runtime_resume_and_get(dev);
 	if (ret < 0)
 		goto rpm_disable;
 



[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