projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d06679
)
ALSA: arm: pxa: pxa2xx-ac97-lib: fix return value check of platform_get_irq()
author
Yang Yingliang
<yangyingliang@huawei.com>
Sat, 29 Oct 2022 08:20:01 +0000
(16:20 +0800)
committer
Takashi Iwai
<tiwai@suse.de>
Sat, 29 Oct 2022 08:45:27 +0000
(10:45 +0200)
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 <yangyingliang@huawei.com>
Link:
https://lore.kernel.org/r/20221029082001.3207380-1-yangyingliang@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/arm/pxa2xx-ac97-lib.c
patch
|
blob
|
history
diff --git
a/sound/arm/pxa2xx-ac97-lib.c
b/sound/arm/pxa2xx-ac97-lib.c
index
e55c042
..
2ca33fd
100644
(file)
--- a/
sound/arm/pxa2xx-ac97-lib.c
+++ b/
sound/arm/pxa2xx-ac97-lib.c
@@
-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)