Skip to content

Commit

Permalink
isdn: hisax: Fix pnp_irq's error checking for setup_hfcs
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ArvindYadavCs authored and davem330 committed Nov 16, 2017
1 parent a6234b8 commit faa2eff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/isdn/hisax/hfcscard.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ int setup_hfcs(struct IsdnCard *card)
}
card->para[1] = pnp_port_start(pnp_d, 0);
card->para[0] = pnp_irq(pnp_d, 0);
if (!card->para[0] || !card->para[1]) {
if (card->para[0] == -1 || !card->para[1]) {
printk(KERN_ERR "HFC PnP:some resources are missing %ld/%lx\n",
card->para[0], card->para[1]);
pnp_disable_dev(pnp_d);
Expand Down

0 comments on commit faa2eff

Please sign in to comment.