From: Haotian Zhang <vulab@iscas.ac.cn>
To: Jerome Brunet <jbrunet@baylibre.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-sound@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: meson: axg-fifo: return a negative error code when no irq is found
Date: Fri, 9 Oct 2026 13:17:24 +0800 [thread overview]
Message-ID: <20261009051724.3134644-1-vulab@iscas.ac.cn> (raw)
In axg_fifo_probe(), of_irq_get() returns 0 when irq_create_of_mapping()
fails to map the interrupt. The error path explicitly treats this as a
failure with "if (fifo->irq <= 0)" and logs "failed to get irq: 0", but
then returns fifo->irq as-is. probe() therefore succeeds with fifo->irq
set to 0, and the failure is only reported much later when
axg_fifo_pcm_open() calls request_threaded_irq() with irq 0.
Return -EINVAL instead of 0, keeping the real negative error codes
untouched.
Fixes: 6dc4fa179fb8 ("ASoC: meson: add axg fifo base driver")
Assisted-by: DeepSeek-V4.1-Flash
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
---
sound/soc/meson/axg-fifo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
index 75909196b769..fdbee44f5101 100644
--- a/sound/soc/meson/axg-fifo.c
+++ b/sound/soc/meson/axg-fifo.c
@@ -365,7 +365,7 @@ int axg_fifo_probe(struct platform_device *pdev)
fifo->irq = of_irq_get(dev->of_node, 0);
if (fifo->irq <= 0) {
dev_err(dev, "failed to get irq: %d\n", fifo->irq);
- return fifo->irq;
+ return fifo->irq ?: -EINVAL;
}
fifo->field_threshold =
--
2.25.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next reply other threads:[~2026-10-09 5:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 5:17 Haotian Zhang [this message]
2026-10-09 5:24 ` sashiko-bot
2026-10-09 6:07 ` Krzysztof Kozlowski
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=20261009051724.3134644-1-vulab@iscas.ac.cn \
--to=vulab@iscas.ac.cn \
--cc=broonie@kernel.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=lgirdwood@gmail.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/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
all inboxes | Powered by JetHome®