mirror of
https://github.com/torvalds/linux.git
synced 2026-09-12 12:34:02 +02:00
ALSA: aoa: i2sbus: Check IRQ before requesting it
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> Link: https://patch.msgid.link/20260824100730.31601-1-phucduc.bui@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
4c0ec35e01
commit
15fd93cbbf
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user