Commit 4d1fd9c1 authored by françois romieu's avatar françois romieu Committed by David S. Miller

via-rhine: gotoize rhine_open error path.

Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a21bb8ba
...@@ -1688,15 +1688,14 @@ static int rhine_open(struct net_device *dev) ...@@ -1688,15 +1688,14 @@ static int rhine_open(struct net_device *dev)
rc = request_irq(rp->irq, rhine_interrupt, IRQF_SHARED, dev->name, dev); rc = request_irq(rp->irq, rhine_interrupt, IRQF_SHARED, dev->name, dev);
if (rc) if (rc)
return rc; goto out;
netif_dbg(rp, ifup, dev, "%s() irq %d\n", __func__, rp->irq); netif_dbg(rp, ifup, dev, "%s() irq %d\n", __func__, rp->irq);
rc = alloc_ring(dev); rc = alloc_ring(dev);
if (rc) { if (rc < 0)
free_irq(rp->irq, dev); goto out_free_irq;
return rc;
}
alloc_rbufs(dev); alloc_rbufs(dev);
alloc_tbufs(dev); alloc_tbufs(dev);
rhine_chip_reset(dev); rhine_chip_reset(dev);
...@@ -1709,7 +1708,12 @@ static int rhine_open(struct net_device *dev) ...@@ -1709,7 +1708,12 @@ static int rhine_open(struct net_device *dev)
netif_start_queue(dev); netif_start_queue(dev);
return 0; out:
return rc;
out_free_irq:
free_irq(rp->irq, dev);
goto out;
} }
static void rhine_reset_task(struct work_struct *work) static void rhine_reset_task(struct work_struct *work)
......
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