The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/5] pinctrl: ocelot: Propagate errors from optional IRQ lookup
@ 2026-08-10  5:31 phucduc.bui
  2026-08-10  5:31 ` [PATCH 2/5] pinctrl: keembay: " phucduc.bui
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: phucduc.bui @ 2026-08-10  5:31 UTC (permalink / raw)
  To: Linus Walleij, Ray Jui, Scott Branden,
	Broadcom internal kernel review list
  Cc: Mika Westerberg, Andy Shevchenko, robh, linux-gpio,
	linux-arm-kernel, linux-kernel, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

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.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 drivers/pinctrl/pinctrl-ocelot.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index 0fe0527863b8..02824da6bcdf 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -2369,6 +2369,8 @@ static int ocelot_gpiochip_register(struct platform_device *pdev,
 	gc->label = "ocelot-gpio";
 
 	irq = platform_get_irq_optional(pdev, 0);
+	if (irq < 0 && irq != -ENXIO)
+		return irq;
 	if (irq > 0) {
 		girq = &gc->irq;
 		gpio_irq_chip_set_chip(girq, &ocelot_irqchip);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-08-10  7:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10  5:31 [PATCH 1/5] pinctrl: ocelot: Propagate errors from optional IRQ lookup phucduc.bui
2026-08-10  5:31 ` [PATCH 2/5] pinctrl: keembay: " phucduc.bui
2026-08-10  6:53   ` Andy Shevchenko
2026-08-10  5:31 ` [PATCH 3/5] pinctrl: lynxpoint: " phucduc.bui
2026-08-10  6:56   ` Andy Shevchenko
2026-08-10  5:31 ` [PATCH 4/5] pinctrl: baytrail: " phucduc.bui
2026-08-10  6:56   ` Andy Shevchenko
2026-08-10  5:31 ` [PATCH 5/5] pinctrl: bcm: iproc-gpio: " phucduc.bui
2026-08-10  6:48   ` Andy Shevchenko
2026-08-10  7:06 ` [PATCH 1/5] pinctrl: ocelot: " Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox