aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/pcnet_cs.c
diff options
context:
space:
mode:
authorYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>2007-06-05 09:55:06 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-08 22:16:40 -0400
commit59b34c1260045ca264c0208f2b666e839909e2d4 (patch)
tree7ae1d7a0f227678d4fbca74643b7c46b559897e8 /drivers/net/pcmcia/pcnet_cs.c
parentd1c0a65fb597697d1fbce4eadf42b84f70483edc (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/pcnet_cs.c')
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 61f7a4f3ee65..f2613c29b008 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)
960 960
961static int pcnet_open(struct net_device *dev) 961static int pcnet_open(struct net_device *dev)
962{ 962{
963 int ret;
963 pcnet_dev_t *info = PRIV(dev); 964 pcnet_dev_t *info = PRIV(dev);
964 struct pcmcia_device *link = info->p_dev; 965 struct pcmcia_device *link = info->p_dev;
965 966
@@ -968,10 +969,12 @@ static int pcnet_open(struct net_device *dev)
968 if (!pcmcia_dev_present(link)) 969 if (!pcmcia_dev_present(link))
969 return -ENODEV; 970 return -ENODEV;
970 971
971 link->open++;
972
973 set_misc_reg(dev); 972 set_misc_reg(dev);
974 request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev); 973 ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev);
974 if (ret)
975 return ret;
976
977 link->open++;
975 978
976 info->phy_id = info->eth_phy; 979 info->phy_id = info->eth_phy;
977 info->link_status = 0x00; 980 info->link_status = 0x00;