Skip to content

Commit 46cf195

Browse files
Yang Yingliangtiwai
authored andcommitted
ALSA: arm: pxa: pxa2xx-ac97-lib: fix return value check of platform_get_irq()
platform_get_irq() returns negative error number on failure, fix the return value check in pxa2xx_ac97_hw_probe() and assign the error code to 'ret'. Fixes: 2548e6c ("ARM: pxa: pxa2xx-ac97-lib: use IRQ resource") Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 8d06679 commit 46cf195

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sound/arm/pxa2xx-ac97-lib.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,10 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev)
402402
goto err_clk2;
403403

404404
irq = platform_get_irq(dev, 0);
405-
if (!irq)
405+
if (irq < 0) {
406+
ret = irq;
406407
goto err_irq;
408+
}
407409

408410
ret = request_irq(irq, pxa2xx_ac97_irq, 0, "AC97", NULL);
409411
if (ret < 0)

0 commit comments

Comments
 (0)