diff options
author | Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2007-06-05 09:55:06 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-08 22:16:40 -0400 |
commit | 59b34c1260045ca264c0208f2b666e839909e2d4 (patch) | |
tree | 7ae1d7a0f227678d4fbca74643b7c46b559897e8 /drivers/net/pcmcia/axnet_cs.c | |
parent | d1c0a65fb597697d1fbce4eadf42b84f70483edc (diff) |
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/axnet_cs.c')
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 808fae1577e0..50dff1b81d34 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -521,6 +521,7 @@ static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value) | |||
521 | 521 | ||
522 | static int axnet_open(struct net_device *dev) | 522 | static int axnet_open(struct net_device *dev) |
523 | { | 523 | { |
524 | int ret; | ||
524 | axnet_dev_t *info = PRIV(dev); | 525 | axnet_dev_t *info = PRIV(dev); |
525 | struct pcmcia_device *link = info->p_dev; | 526 | struct pcmcia_device *link = info->p_dev; |
526 | 527 | ||
@@ -529,9 +530,11 @@ static int axnet_open(struct net_device *dev) | |||
529 | if (!pcmcia_dev_present(link)) | 530 | if (!pcmcia_dev_present(link)) |
530 | return -ENODEV; | 531 | return -ENODEV; |
531 | 532 | ||
532 | link->open++; | 533 | ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev); |
534 | if (ret) | ||
535 | return ret; | ||
533 | 536 | ||
534 | request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev); | 537 | link->open++; |
535 | 538 | ||
536 | info->link_status = 0x00; | 539 | info->link_status = 0x00; |
537 | init_timer(&info->watchdog); | 540 | init_timer(&info->watchdog); |