ARM: pxa: pxa2xx-ac97-lib: fix return value check of platform_get_irq()
Subsystems (2)
PATCH RESEND 1/1 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 2548e6c76ebf ("ARM: pxa: pxa2xx-ac97-lib: use IRQ resource")
Signed-off-by Yang Yingliang <[email protected]>
---
The previous link:
https://lore.kernel.org/lkml/[email protected]/T/#u
--- sound/arm/pxa2xx-ac97-lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/arm/pxa2xx-ac97-lib.c +3 -1
@@ -402,8 +402,10 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev) goto err_clk2; irq =platform_get_irq (dev,0 ); -if (!irq) +if (irq <0 ) { + ret = irq; goto err_irq; + } ret =request_irq (irq, pxa2xx_ac97_irq,0 ,"AC97" ,NULL );if (ret <0 )
Signature · 1 line
2.25.1
Takashi Iwai
AppliedQuoted 7 lines · Yang Yingliang
platform_get_irq()returns negative error number on failure, fix the return value check inpxa2xx_ac97_hw_probe()and assign the error code to 'ret'.Fixes 2548e6c76ebf ("ARM: pxa: pxa2xx-ac97-lib: use IRQ resource")Signed-off-by Yang Yingliang <[email protected]>
Thanks, applied.
Takashi