The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: 91f742be16497a435c929b3350d58b12acb16ce5
Gitweb: https://git.kernel.org/tip/91f742be16497a435c929b3350d58b12acb16ce5
Author: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
AuthorDate: Wed, 20 May 2026 23:17:36 +03:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Thu, 21 May 2026 11:48:30 +02:00
irqchip/renesas-rzv2h: Unwind on setup error
The call to rzv2h_icu_setup_irqs() may fail after the syscore ops have
been registered and the interrupt domain has been created. In that case, only
the runtime PM usage count is unwound.
Unregister the syscore ops and remove the interrupt domain on this error path.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260520201736.1509741-1-cosmin-gabriel.tanislav.xa@renesas.com
---
drivers/irqchip/irq-renesas-rzv2h.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-renesas-rzv2h.c b/drivers/irqchip/irq-renesas-rzv2h.c
index 31c543c..b11fa48 100644
--- a/drivers/irqchip/irq-renesas-rzv2h.c
+++ b/drivers/irqchip/irq-renesas-rzv2h.c
@@ -865,7 +865,7 @@ static int rzv2h_icu_probe_common(struct platform_device *pdev, struct device_no
ret = rzv2h_icu_setup_irqs(pdev, irq_domain);
if (ret)
- goto pm_put;
+ goto unregister_syscore;
/*
* coccicheck complains about a missing put_device call before returning, but it's a false
@@ -873,6 +873,9 @@ static int rzv2h_icu_probe_common(struct platform_device *pdev, struct device_no
*/
return 0;
+unregister_syscore:
+ unregister_syscore(&rzv2h_irqc_syscore);
+ irq_domain_remove(irq_domain);
pm_put:
pm_runtime_put_sync(dev);
return ret;