From: phucduc.bui@gmail.com
To: Adrian Ng <adrianhoyin.ng@altera.com>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: bui duc phuc <phucduc.bui@gmail.com>, Mark Brown <broonie@kernel.org>
Subject: [PATCH] gpio: altera: Fix build failure caused by undeclared 'irq'
Date: Thu, 3 Sep 2026 10:07:00 +0700 [thread overview]
Message-ID: <20260903030700.132068-1-phucduc.bui@gmail.com> (raw)
From: bui duc phuc <phucduc.bui@gmail.com>
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")
Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/all/apgNYDiSiPmNZspF@sirena.org.uk/
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/gpio/gpio-altera.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c
index d22f5be00745..a6ac9356229c 100644
--- a/drivers/gpio/gpio-altera.c
+++ b/drivers/gpio/gpio-altera.c
@@ -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;
}
--
2.43.0
next reply other threads:[~2026-09-03 3:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 3:07 phucduc.bui [this message]
2026-09-03 9:05 ` [PATCH] gpio: altera: Fix build failure caused by undeclared 'irq' Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260903030700.132068-1-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=adrianhoyin.ng@altera.com \
--cc=brgl@kernel.org \
--cc=broonie@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox