Commit eb545c12 authored by Arvind Yadav's avatar Arvind Yadav Committed by David S. Miller

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent faa2efff
...@@ -940,6 +940,8 @@ static int fcpnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) ...@@ -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->io = pnp_port_start(pdev, 0);
adapter->irq = pnp_irq(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", printk(KERN_INFO "hisax_fcpcipnp: found adapter %s at IO %#x irq %d\n",
(char *) dev_id->driver_data, adapter->io, adapter->irq); (char *) dev_id->driver_data, adapter->io, adapter->irq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment