Re: [PATCH 1/4] gpio: realtek-otto: Handle errors from optional IRQ lookup

From: Andy Shevchenko

Date: Mon Sep 28 2026 - 05:57:42 EST


On Fri, Aug 14, 2026 at 11:30:25AM +0700, phucduc.bui@xxxxxxxxx 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. Other errors, such as -EPROBE_DEFER
> and -EINVAL, should be propagated so that the caller can handle them
> appropriately.
>
> Propagate negative errors other than -ENXIO.

Have you read the discussion [1]?
It would be better to make platform_get_irq_optional() to be actually optional.

[1]: https://lore.kernel.org/lkml/20220212201631.12648-1-s.shtylyov@xxxxxx/

--
With Best Regards,
Andy Shevchenko