* [PATCH] ALSA: aoa: i2sbus: Check IRQ before requesting it
@ 2026-08-24 10:07 phucduc.bui
2026-08-25 7:59 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: phucduc.bui @ 2026-08-24 10:07 UTC (permalink / raw)
To: Johannes Berg, Jaroslav Kysela, Takashi Iwai
Cc: Kees Cook, Thorsten Blum, cassiogabrielcontato, linuxppc-dev,
linux-sound, linux-kernel, bui duc phuc
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: aoa: i2sbus: Check IRQ before requesting it
2026-08-24 10:07 [PATCH] ALSA: aoa: i2sbus: Check IRQ before requesting it phucduc.bui
@ 2026-08-25 7:59 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-08-25 7:59 UTC (permalink / raw)
To: phucduc.bui
Cc: Johannes Berg, Jaroslav Kysela, Takashi Iwai, Kees Cook,
Thorsten Blum, cassiogabrielcontato, linuxppc-dev, linux-sound,
linux-kernel
On Mon, 24 Aug 2026 12:07:30 +0200,
phucduc.bui@gmail.com wrote:
>
> 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>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-25 7:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-24 10:07 [PATCH] ALSA: aoa: i2sbus: Check IRQ before requesting it phucduc.bui
2026-08-25 7:59 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox