Commit b0927bd9 authored by Arvind Yadav's avatar Arvind Yadav Committed by David S. Miller

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 84dcc16c
...@@ -805,7 +805,7 @@ static int avm_pnp_setup(struct IsdnCardState *cs) ...@@ -805,7 +805,7 @@ static int avm_pnp_setup(struct IsdnCardState *cs)
cs->hw.avm.cfg_reg = cs->hw.avm.cfg_reg =
pnp_port_start(pnp_avm_d, 0); pnp_port_start(pnp_avm_d, 0);
cs->irq = pnp_irq(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"); printk(KERN_ERR "FritzPnP:No IRQ\n");
return (0); return (0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment