diff options
author | Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2007-06-05 13:55:06 (GMT) |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-09 02:16:40 (GMT) |
commit | 59b34c1260045ca264c0208f2b666e839909e2d4 (patch) | |
tree | 7ae1d7a0f227678d4fbca74643b7c46b559897e8 /drivers/net/pcmcia/pcnet_cs.c | |
parent | d1c0a65fb597697d1fbce4eadf42b84f70483edc (diff) | |
download | linux-59b34c1260045ca264c0208f2b666e839909e2d4.tar.xz |
add return value check of request_irq()
This patch has added return value check of request_irq() to pcmcia net drivers.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/pcmcia/pcnet_cs.c')
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 61f7a4f..f2613c2 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c @@ -960,6 +960,7 @@ static void mii_phy_probe(struct net_device *dev) static int pcnet_open(struct net_device *dev) { + int ret; pcnet_dev_t *info = PRIV(dev); struct pcmcia_device *link = info->p_dev; @@ -968,10 +969,12 @@ static int pcnet_open(struct net_device *dev) if (!pcmcia_dev_present(link)) return -ENODEV; - link->open++; - set_misc_reg(dev); - request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev); + ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev); + if (ret) + return ret; + + link->open++; info->phy_id = info->eth_phy; info->link_status = 0x00; |