ALSA: aoa: i2sbus: Check IRQ before requesting it
Subsystems (2)
PATCH 1/1 ALSA: aoa: i2sbus: Check IRQ before requesting it
From: bui duc phuc <[email protected]>
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 <[email protected]>
--- sound/aoa/soundbus/i2sbus/core.c | 2 ++ 1 file changed, 2 insertions(+)
sound/aoa/soundbus/i2sbus/core.c +2 -0
@@ -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;
Signature · 1 line
2.43.0
Quoted 10 lines · On Mon, 24 Aug 2026 12:07:30 +0200, [email protected] wrote:
From: bui duc phuc <[email protected]>
irq_of_parse_and_map()returns 0 when parsing or mapping an IRQ fails. The return value was passed torequest_irq()without checking for failure.Check the return value before passing it to
request_irq().Signed-off-by bui duc phuc <[email protected]>
Applied now. Thanks.
Takashi