* [PATCH] irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
@ 2022-11-24 6:51 Shang XiaoJing
2022-11-26 13:34 ` [irqchip: irq/irqchip-next] " irqchip-bot for Shang XiaoJing
0 siblings, 1 reply; 2+ messages in thread
From: Shang XiaoJing @ 2022-11-24 6:51 UTC (permalink / raw)
To: tglx, maz, jonathanh, linux-kernel; +Cc: shangxiaojing
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@huawei.com>
---
drivers/irqchip/irq-gic-pm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-pm.c b/drivers/irqchip/irq-gic-pm.c
index b60e1853593f..3989d16f997b 100644
--- a/drivers/irqchip/irq-gic-pm.c
+++ b/drivers/irqchip/irq-gic-pm.c
@@ -102,7 +102,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;
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [irqchip: irq/irqchip-next] irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
2022-11-24 6:51 [PATCH] irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe() Shang XiaoJing
@ 2022-11-26 13:34 ` irqchip-bot for Shang XiaoJing
0 siblings, 0 replies; 2+ messages in thread
From: irqchip-bot for Shang XiaoJing @ 2022-11-26 13:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Shang XiaoJing, Marc Zyngier, tglx
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: f9ee20c85b3a3ba0afd3672630ec4f93d339f015
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/f9ee20c85b3a3ba0afd3672630ec4f93d339f015
Author: Shang XiaoJing <shangxiaojing@huawei.com>
AuthorDate: Thu, 24 Nov 2022 14:51:50 +08:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Sat, 26 Nov 2022 13:29:42
irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
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@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221124065150.22809-1-shangxiaojing@huawei.com
---
drivers/irqchip/irq-gic-pm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-pm.c b/drivers/irqchip/irq-gic-pm.c
index b60e185..3989d16 100644
--- a/drivers/irqchip/irq-gic-pm.c
+++ b/drivers/irqchip/irq-gic-pm.c
@@ -102,7 +102,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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-26 13:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 6:51 [PATCH] irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe() Shang XiaoJing
2022-11-26 13:34 ` [irqchip: irq/irqchip-next] " irqchip-bot for Shang XiaoJing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®