Skip to contentSkip to conversation

gpio: altera: Fix build failure caused by undeclared 'irq'

PATCH Applied [email protected] 2 participants 2 messages Sep 3

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: altera: Fix build failure caused by undeclared 'irq'

From: bui duc phuc <[email protected]>

Use 'mapped_irq' instead of the undefined 'irq' variable in altera_gpio_probe().

The incorrect variable name causes the driver to fail to build with an 'irq' undeclared error.

Fixes 6e6e585b603e4 ("gpio: altera: Handle errors from optional IRQ lookup")
---
 drivers/gpio/gpio-altera.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-altera.c +2 -2
index d22f5be00745..a6ac9356229c 100644
@@ -221,8 +221,8 @@ static int altera_gpio_probe(struct platform_device *pdev)
 
 	mapped_irq = platform_get_irq_optional(pdev, 0);
 	if (mapped_irq < 0) {
-		if (irq != -ENXIO)
-			return irq;
+		if (mapped_irq != -ENXIO)
+			return mapped_irq;
 		goto skip_irq;
 	}
 
Signature · 1 line
2.43.0
#1 lore raw
Quoted 8 lines · On Thu, 03 Sep 2026 10:07:00 +0700, [email protected] wrote:

Use 'mapped_irq' instead of the undefined 'irq' variable in altera_gpio_probe().

The incorrect variable name causes the driver to fail to build with an 'irq' undeclared error.

[...]

Applied, thanks!

[1/1] gpio: altera: Fix build failure caused by undeclared 'irq'

      https://git.kernel.org/brgl/c/a2cfc48fee416f0ea78e7dc38acbf2ce072574cc

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>