Commit 59b34c12 authored by Yoichi Yuasa's avatar Yoichi Yuasa Committed by Jeff Garzik

add return value check of request_irq()

This patch has added return value check of request_irq() to pcmcia net drivers.
Signed-off-by: default avatarYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent d1c0a65f
...@@ -521,6 +521,7 @@ static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value) ...@@ -521,6 +521,7 @@ static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value)
static int axnet_open(struct net_device *dev) static int axnet_open(struct net_device *dev)
{ {
int ret;
axnet_dev_t *info = PRIV(dev); axnet_dev_t *info = PRIV(dev);
struct pcmcia_device *link = info->p_dev; struct pcmcia_device *link = info->p_dev;
...@@ -529,9 +530,11 @@ static int axnet_open(struct net_device *dev) ...@@ -529,9 +530,11 @@ static int axnet_open(struct net_device *dev)
if (!pcmcia_dev_present(link)) if (!pcmcia_dev_present(link))
return -ENODEV; return -ENODEV;
link->open++; ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev);
if (ret)
return ret;
request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev); link->open++;
info->link_status = 0x00; info->link_status = 0x00;
init_timer(&info->watchdog); init_timer(&info->watchdog);
......
...@@ -960,6 +960,7 @@ static void mii_phy_probe(struct net_device *dev) ...@@ -960,6 +960,7 @@ static void mii_phy_probe(struct net_device *dev)
static int pcnet_open(struct net_device *dev) static int pcnet_open(struct net_device *dev)
{ {
int ret;
pcnet_dev_t *info = PRIV(dev); pcnet_dev_t *info = PRIV(dev);
struct pcmcia_device *link = info->p_dev; struct pcmcia_device *link = info->p_dev;
...@@ -968,10 +969,12 @@ static int pcnet_open(struct net_device *dev) ...@@ -968,10 +969,12 @@ static int pcnet_open(struct net_device *dev)
if (!pcmcia_dev_present(link)) if (!pcmcia_dev_present(link))
return -ENODEV; return -ENODEV;
link->open++;
set_misc_reg(dev); 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->phy_id = info->eth_phy;
info->link_status = 0x00; info->link_status = 0x00;
......
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