Re: [PATCH 5/5] pinctrl: bcm: iproc-gpio: Propagate errors from optional IRQ lookup
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-gpio,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAHp75VcGqgtUxYcrT+JdqFYX-4oKSfGQKRHd9DoaMW3f1FaR1A@mail.gmail.com> |
On Mon, Aug 10, 2026 at 8:32 AM <[email protected]> wrote: > > From: bui duc phuc <[email protected]> > > 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