* [PATCH] ARM: pxa: pxa2xx-ac97-lib: fix tests for platform_get_irq() failure
@ 2022-08-25 1:24 Yu Zhe
0 siblings, 0 replies; only message in thread
From: Yu Zhe @ 2022-08-25 1:24 UTC (permalink / raw)
To: daniel, haojian.zhuang, robert.jarzmik, perex, tiwai
Cc: liqiong, Yu Zhe, alsa-devel, linux-kernel, linux-arm-kernel
The platform_get_irq() returns negative error codes. It can't actually
return zero.
Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
---
sound/arm/pxa2xx-ac97-lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
index e55c0421718b..1f4c4749a6fb 100644
--- a/sound/arm/pxa2xx-ac97-lib.c
+++ b/sound/arm/pxa2xx-ac97-lib.c
@@ -402,7 +402,7 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev)
goto err_clk2;
irq = platform_get_irq(dev, 0);
- if (!irq)
+ if (irq < 0)
goto err_irq;
ret = request_irq(irq, pxa2xx_ac97_irq, 0, "AC97", NULL);
--
2.11.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-25 11:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 1:24 [PATCH] ARM: pxa: pxa2xx-ac97-lib: fix tests for platform_get_irq() failure Yu Zhe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).