Skip to content

Commit

Permalink
isdn: hisax: Fix pnp_irq's error checking for avm_pnp_setup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ArvindYadavCs authored and davem330 committed Nov 16, 2017
1 parent 84dcc16 commit b0927bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/isdn/hisax/avm_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b0927bd

Please sign in to comment.