From: Arvind Yadav Date: Thu, 16 Nov 2017 04:27:19 +0000 (+0530) Subject: isdn: hisax: Fix pnp_irq's error checking for avm_pnp_setup X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b0927bd98f2bdb5687ff038ee5bb9ecaa7a27dfa;p=openwrt%2Fstaging%2Fblogic.git isdn: hisax: Fix pnp_irq's error checking for avm_pnp_setup The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller --- diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c index daf3742cdef6..a18b605fb4f2 100644 --- a/drivers/isdn/hisax/avm_pci.c +++ b/drivers/isdn/hisax/avm_pci.c @@ -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); }