All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: pxa: propagate pxa_gpio_probe_dt() error code
@ 2026-10-09  5:06 Haotian Zhang
  2026-10-09  5:16 ` sashiko-bot
  2026-10-09  6:07 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 3+ messages in thread
From: Haotian Zhang @ 2026-10-09  5:06 UTC (permalink / raw)
  To: Robert Jarzmik, Linus Walleij, Bartosz Golaszewski
  Cc: linux-gpio, linux-kernel

pxa_gpio_probe_dt() returns the negative errno produced by
devm_irq_alloc_descs(), which may be -ENOMEM, -EINVAL or -EEXIST. The
caller in pxa_gpio_probe() overwrites that value with a fixed -EINVAL, so
the actual reason for the failure is lost.

Return irq_base so that the original error code is propagated.

Fixes: 384ca3c6a28d ("gpio: pxa: change the interrupt management")
Assisted-by: DeepSeek-V4.1-Flash
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
---
 drivers/gpio/gpio-pxa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index 2b5da973f51f..ef3f21723b09 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -632,7 +632,7 @@ static int pxa_gpio_probe(struct platform_device *pdev)
 	} else {
 		irq_base = pxa_gpio_probe_dt(pdev, pchip);
 		if (irq_base < 0)
-			return -EINVAL;
+			return irq_base;
 	}
 
 	if (!pxa_last_gpio)
-- 
2.25.1


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

end of thread, other threads:[~2026-10-09  6:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09  5:06 [PATCH] gpio: pxa: propagate pxa_gpio_probe_dt() error code Haotian Zhang
2026-10-09  5:16 ` sashiko-bot
2026-10-09  6:07 ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.