Skip to content

Commit

Permalink
isdn: hisax: Handle return value of pnp_irq and pnp_port_start
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ArvindYadavCs authored and davem330 committed Nov 16, 2017
1 parent faa2eff commit eb545c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/isdn/hisax/hisax_fcpcipnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eb545c1

Please sign in to comment.