Re: [PATCH 2/3] platform/x86: intel: punit_ipc: Propagate errors from optional IRQ lookup
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAHp75VeCWatCnsWnzRe3mVM3bDCJkqJTOh8vYyY=GoFgqg18hQ@mail.gmail.com> |
On Mon, Aug 10, 2026 at 8:26 AM <[email protected]> wrote: > 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 and the driver can fall back to polling > mode. Other errors should be propagated so that the caller can handle > them appropriately. > > Treat -ENXIO as the only case where the driver falls back to polling > mode, and propagate all other errors returned by > platform_get_irq_optional(). ... > irq = platform_get_irq_optional(pdev, 0); > if (irq < 0) { > + if (irq != -ENXIO) > + return irq; > dev_warn(&pdev->dev, "Invalid IRQ, using polling mode\n"); I can admit that the warning message is not comprehensive, but after this patch it obviously makes a regression. A previously working driver for even some Linux failures (besides deferred probe) now becomes unusable. Have you studied the possible error codes returned by platform_get_irq_optional()? What are they? Perhaps you need to improve the documentation of that API? -- With Best Regards, Andy Shevchenko