]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
authorShang XiaoJing <shangxiaojing@huawei.com>
Thu, 24 Nov 2022 06:51:50 +0000 (14:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:40:54 +0000 (11:40 +0100)
commit465e2529c6279ba823b90ffae0ed704a66d21270
tree6cf679df417f75f30c30e4c3e74f67e0a09f68b7
parent60a8cd58cec64de3c785863b6136b49fe577cbd2
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: 52b159a97b2c ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/irqchip/irq-gic-pm.c