* [PATCH] ARM: pxa: fix platform_get_irq error checking
@ 2022-09-09 3:27 Yu Zhe
0 siblings, 0 replies; only message in thread
From: Yu Zhe @ 2022-09-09 3:27 UTC (permalink / raw)
To: daniel, haojian.zhuang, robert.jarzmik, linux
Cc: linux-arm-kernel, linux-kernel, kernel-janitors, liqiong, Yu Zhe
The platform_get_irq() function returns negative error codes on error,
so change the '<=0' check to '<0' to make code more explicit.
Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
---
arch/arm/mach-pxa/pxa_cplds_irqs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-pxa/pxa_cplds_irqs.c b/arch/arm/mach-pxa/pxa_cplds_irqs.c
index eda5a47d7fbb..aa284031071d 100644
--- a/arch/arm/mach-pxa/pxa_cplds_irqs.c
+++ b/arch/arm/mach-pxa/pxa_cplds_irqs.c
@@ -115,7 +115,7 @@ static int cplds_probe(struct platform_device *pdev)
return -ENOMEM;
fpga->irq = platform_get_irq(pdev, 0);
- if (fpga->irq <= 0)
+ if (fpga->irq < 0)
return fpga->irq;
base_irq = platform_get_irq(pdev, 1);
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-09 3:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-09 3:27 [PATCH] ARM: pxa: fix platform_get_irq error checking 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).