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@xxxxxxxxxxxx> --- 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