diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-11-16 09:57:25 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-16 22:31:16 +0900 |
commit | 56cdb919f70abfb353171fd705ab65053f7cc057 (patch) | |
tree | 07f7ccddbc2d6cf41e5fb7d301ae390d84259d54 /drivers/isdn | |
parent | eb545c124aac9cd9c1bef6b39e0d8e8e520f9d87 (diff) | |
download | linux-56cdb919f70abfb353171fd705ab65053f7cc057.tar.bz2 |
isdn: hisax: Fix pnp_irq's error checking for setup_isurf
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/isurf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c index 1399ddd4f6cb..53e299be4304 100644 --- a/drivers/isdn/hisax/isurf.c +++ b/drivers/isdn/hisax/isurf.c @@ -238,7 +238,7 @@ int setup_isurf(struct IsdnCard *card) cs->hw.isurf.reset = pnp_port_start(pnp_d, 0); cs->hw.isurf.phymem = pnp_mem_start(pnp_d, 1); cs->irq = pnp_irq(pnp_d, 0); - if (!cs->irq || !cs->hw.isurf.reset || !cs->hw.isurf.phymem) { + if (cs->irq == -1 || !cs->hw.isurf.reset || !cs->hw.isurf.phymem) { printk(KERN_ERR "ISurfPnP:some resources are missing %d/%x/%lx\n", cs->irq, cs->hw.isurf.reset, cs->hw.isurf.phymem); pnp_disable_dev(pnp_d); |