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

* [tip: irq/urgent] irqchip/renesas-rzv2h: Unwind on setup error
  2026-05-20 20:17 [PATCH] irqchip/renesas-rzv2h: unwind on IRQ setup error Cosmin Tanislav
@ 2026-05-21  9:50 ` tip-bot2 for Cosmin Tanislav
  2026-05-21  9:58   ` Cosmin-Gabriel Tanislav
  2026-05-27 10:51 ` [PATCH] irqchip/renesas-rzv2h: unwind on IRQ " Geert Uytterhoeven
  1 sibling, 1 reply; 5+ messages in thread
From: tip-bot2 for Cosmin Tanislav @ 2026-05-21  9:50 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Cosmin Tanislav, Thomas Gleixner, x86, linux-kernel, maz

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;

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

* RE: [tip: irq/urgent] irqchip/renesas-rzv2h: Unwind on setup error
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Cosmin-Gabriel Tanislav @ 2026-05-21  9:58 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
	Thomas Gleixner
  Cc: x86@kernel.org, maz@kernel.org

> From: tip-bot2@linutronix.de <tip-bot2@linutronix.de>
> Sent: Thursday, May 21, 2026 12:51 PM
> 
> The following commit has been merged into the irq/urgent branch of tip:
> 

Hi Thomas.

Sashiko identified some valid issues with this patch, I'm working on
addressing them. I think we shouldn't be merging this patch for now if
possible.

https://sashiko.dev/#/patchset/20260520201736.1509741-1-cosmin-gabriel.tanislav.xa%40renesas.com

> 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;

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

* RE: [tip: irq/urgent] irqchip/renesas-rzv2h: Unwind on setup error
  2026-05-21  9:58   ` Cosmin-Gabriel Tanislav
@ 2026-05-21 18:12     ` Thomas Gleixner
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2026-05-21 18:12 UTC (permalink / raw)
  To: Cosmin-Gabriel Tanislav, linux-kernel@vger.kernel.org,
	linux-tip-commits@vger.kernel.org
  Cc: x86@kernel.org, maz@kernel.org

On Thu, May 21 2026 at 09:58, Cosmin-Gabriel Tanislav wrote:
>> From: tip-bot2@linutronix.de <tip-bot2@linutronix.de>
>> Sent: Thursday, May 21, 2026 12:51 PM
>> 
>> The following commit has been merged into the irq/urgent branch of tip:
>> 
>
> Hi Thomas.
>
> Sashiko identified some valid issues with this patch, I'm working on

Indeed.

> addressing them. I think we shouldn't be merging this patch for now if
> possible.

I removed it from the urgent branch.

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

* Re: [PATCH] irqchip/renesas-rzv2h: unwind on IRQ setup error
  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-27 10:51 ` Geert Uytterhoeven
  1 sibling, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2026-05-27 10:51 UTC (permalink / raw)
  To: Cosmin Tanislav; +Cc: Thomas Gleixner, Lad Prabhakar, linux-kernel

On Wed, 20 May 2026 at 22:18, Cosmin Tanislav
<cosmin-gabriel.tanislav.xa@renesas.com> wrote:
> 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>

Fixes: 61adc4813d67990f ("irqchip/renesas-rzv2h: Add CA55 software
interrupt support")
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[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.