All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/renesas-rzv2h: unwind on IRQ setup error
@ 2026-05-20 20:17 Cosmin Tanislav
  2026-05-21  9:50 ` [tip: irq/urgent] irqchip/renesas-rzv2h: Unwind on " tip-bot2 for Cosmin Tanislav
  2026-05-27 10:51 ` [PATCH] irqchip/renesas-rzv2h: unwind on IRQ " Geert Uytterhoeven
  0 siblings, 2 replies; 5+ messages in thread
From: Cosmin Tanislav @ 2026-05-20 20:17 UTC (permalink / raw)
  To: Thomas Gleixner, Lad Prabhakar, Geert Uytterhoeven,
	Cosmin Tanislav
  Cc: linux-kernel

The call to rzv2h_icu_setup_irqs() may fail after the syscore ops have
been registered and the IRQ domain has been created. In that case, only
the runtime PM usage count is unwound.

Unregister the syscore ops and remove the IRQ domain on this error path.

Signed-off-by: Cosmin Tanislav <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 31c543c876b1..b11fa48c1996 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;
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-27 10:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20 20:17 [PATCH] irqchip/renesas-rzv2h: unwind on IRQ setup error Cosmin Tanislav
2026-05-21  9:50 ` [tip: irq/urgent] irqchip/renesas-rzv2h: Unwind on " tip-bot2 for Cosmin Tanislav
2026-05-21  9:58   ` Cosmin-Gabriel Tanislav
2026-05-21 18:12     ` Thomas Gleixner
2026-05-27 10:51 ` [PATCH] irqchip/renesas-rzv2h: unwind on IRQ " Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.