summaryrefslogtreecommitdiff
path: root/drivers/isdn
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-11-16 09:57:29 +0530
committerDavid S. Miller <davem@davemloft.net>2017-11-16 22:31:16 +0900
commit20525563b218471fac7254b577ef6743a697d70a (patch)
tree1f3740600628c416c6600448cc5912b539fb62c6 /drivers/isdn
parentd48cc29ae75fb492f87a650bb8054db222de5d4c (diff)
downloadlwn-20525563b218471fac7254b577ef6743a697d70a.tar.gz
lwn-20525563b218471fac7254b577ef6743a697d70a.zip
isdn: hisax: Fix pnp_irq's error checking for setup_teles3
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>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/hisax/teles3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c
index 38fb2c1a3f0f..1eef693f04f0 100644
--- a/drivers/isdn/hisax/teles3.c
+++ b/drivers/isdn/hisax/teles3.c
@@ -306,7 +306,7 @@ int setup_teles3(struct IsdnCard *card)
card->para[2] = pnp_port_start(pnp_d, 1);
card->para[1] = pnp_port_start(pnp_d, 0);
card->para[0] = pnp_irq(pnp_d, 0);
- if (!card->para[0] || !card->para[1] || !card->para[2]) {
+ if (card->para[0] == -1 || !card->para[1] || !card->para[2]) {
printk(KERN_ERR "Teles PnP:some resources are missing %ld/%lx/%lx\n",
card->para[0], card->para[1], card->para[2]);
pnp_disable_dev(pnp_d);