RE: [tip: irq/urgent] irqchip/renesas-rzv2h: Unwind on setup error
From: Cosmin-Gabriel Tanislav
Date: Thu May 21 2026 - 06:05:31 EST
> From: tip-bot2@xxxxxxxxxxxxx <tip-bot2@xxxxxxxxxxxxx>
> 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@xxxxxxxxxxx>
> AuthorDate: Wed, 20 May 2026 23:17:36 +03:00
> Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
> 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@xxxxxxxxxxx>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
> Link: https://patch.msgid.link/20260520201736.1509741-1-cosmin-gabriel.tanislav.xa@xxxxxxxxxxx
> ---
> 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;