summaryrefslogtreecommitdiff
path: root/drivers/isdn/hisax
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-11-16 09:57:24 +0530
committerDavid S. Miller <davem@davemloft.net>2017-11-16 22:31:16 +0900
commiteb545c124aac9cd9c1bef6b39e0d8e8e520f9d87 (patch)
tree695711ff115ff7720d580d117118b12381f1c6c1 /drivers/isdn/hisax
parentfaa2efff3dfa4f03cfdbf86e77cd94b16f1fbdf8 (diff)
isdn: hisax: Handle return value of pnp_irq and pnp_port_start
pnp_irq() and pnp_port_start() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hisax')
-rw-r--r--drivers/isdn/hisax/hisax_fcpcipnp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c
index e4f7573ba9bf..7a7137d8664b 100644
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.c
@@ -940,6 +940,8 @@ static int fcpnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id)
}
adapter->io = pnp_port_start(pdev, 0);
adapter->irq = pnp_irq(pdev, 0);
+ if (!adapter->io || adapter->irq == -1)
+ goto err_free;
printk(KERN_INFO "hisax_fcpcipnp: found adapter %s at IO %#x irq %d\n",
(char *) dev_id->driver_data, adapter->io, adapter->irq);