From: phucduc.bui@gmail.com
To: Johannes Berg <johannes@sipsolutions.net>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: Kees Cook <kees@kernel.org>,
Thorsten Blum <thorsten.blum@linux.dev>,
cassiogabrielcontato@gmail.com, linuxppc-dev@lists.ozlabs.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH] ALSA: aoa: i2sbus: Check IRQ before requesting it
Date: Mon, 24 Aug 2026 17:07:30 +0700 [thread overview]
Message-ID: <20260824100730.31601-1-phucduc.bui@gmail.com> (raw)
From: bui duc phuc <phucduc.bui@gmail.com>
irq_of_parse_and_map() returns 0 when parsing or mapping an IRQ fails.
The return value was passed to request_irq() without checking for
failure.
Check the return value before passing it to request_irq().
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/aoa/soundbus/i2sbus/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
index 833c44c0a950..adf123dd79a2 100644
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -240,6 +240,8 @@ static int i2sbus_add_dev(struct macio_dev *macio,
}
for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) {
int irq = irq_of_parse_and_map(np, i);
+ if (!irq)
+ goto err;
if (request_irq(irq, ints[i], 0, dev->rnames[i], dev))
goto err;
dev->interrupts[i] = irq;
--
2.43.0
next reply other threads:[~2026-08-24 10:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 10:07 phucduc.bui [this message]
2026-08-25 7:59 ` [PATCH] ALSA: aoa: i2sbus: Check IRQ before requesting it Takashi Iwai
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=20260824100730.31601-1-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=cassiogabrielcontato@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=perex@perex.cz \
--cc=thorsten.blum@linux.dev \
--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