Skip to content

Commit 690a864

Browse files
Shang XiaoJinggregkh
authored andcommitted
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: 9c8eddd ("irqchip/gic: Add platform driver for non-root GICs that require RPM") Signed-off-by: Shang XiaoJing <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent ea77b4b commit 690a864

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/irqchip/irq-gic-pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int gic_probe(struct platform_device *pdev)
112112

113113
pm_runtime_enable(dev);
114114

115-
ret = pm_runtime_get_sync(dev);
115+
ret = pm_runtime_resume_and_get(dev);
116116
if (ret < 0)
117117
goto rpm_disable;
118118

0 commit comments

Comments
 (0)