Re: [PATCH 5/5] pinctrl: bcm: iproc-gpio: Propagate errors from optional IRQ lookup
From: Andy Shevchenko
Date: Mon Aug 10 2026 - 02:53:38 EST
On Mon, Aug 10, 2026 at 8:32 AM <phucduc.bui@xxxxxxxxx> wrote:
>
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> platform_get_irq_optional() returns a positive IRQ number on success or
> a negative error code on failure. For an optional IRQ, -ENXIO indicates
> that no optional IRQ is available, while other errors should be propagated.
>
> Propagate all error codes returned by platform_get_irq_optional() other
> than -ENXIO.
...
> /* optional GPIO interrupt support */
> irq = platform_get_irq_optional(pdev, 0);
> + if (irq < 0 && irq != -ENXIO)
> + return irq;
Here and everywhere else in the similar contributions you made all
over the kernel:
> if (irq > 0) {
> struct gpio_irq_chip *girq;
Use the 'else' branch instead of the above.
} else if (irq != -ENXIO) {
return irq;
But before doing that, check carefully if this is really what we want
to have and how it will affect the driver behaviour in such a case.
--
With Best Regards,
Andy Shevchenko