isdn: hisax: Fix pnp_irq's error checking for avm_pnp_setup
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 16 Nov 2017 04:27:19 +0000 (09:57 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Nov 2017 13:31:15 +0000 (22:31 +0900)
The pnp_irq() function returns -1 if an error occurs.
pnp_irq() error checking for zero is not correct.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/hisax/avm_pci.c

index daf3742cdef650002eaa76924e681b9f4a04ec74..a18b605fb4f23e97d863b6bc64db924ad58053eb 100644 (file)
@@ -805,7 +805,7 @@ static int avm_pnp_setup(struct IsdnCardState *cs)
                        cs->hw.avm.cfg_reg =
                                pnp_port_start(pnp_avm_d, 0);
                        cs->irq = pnp_irq(pnp_avm_d, 0);
-                       if (!cs->irq) {
+                       if (cs->irq == -1) {
                                printk(KERN_ERR "FritzPnP:No IRQ\n");
                                return (0);
                        }