summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/via
diff options
context:
space:
mode:
authorfrançois romieu <romieu@fr.zoreil.com>2015-05-01 22:14:40 +0200
committerDavid S. Miller <davem@davemloft.net>2015-05-04 00:18:26 -0400
commit4d1fd9c1d89e5ca033c1e0cbd2838180c2e01f8b (patch)
treeac36c1ac231194709b9e74e8adc2ae9bf593fae6 /drivers/net/ethernet/via
parenta21bb8bae1057ecd071f6d43b9ee3f97503ad904 (diff)
via-rhine: gotoize rhine_open error path.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/via')
-rw-r--r--drivers/net/ethernet/via/via-rhine.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index aa398ea5a609..91661e0cbe3b 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -1688,15 +1688,14 @@ static int rhine_open(struct net_device *dev)
rc = request_irq(rp->irq, rhine_interrupt, IRQF_SHARED, dev->name, dev);
if (rc)
- return rc;
+ goto out;
netif_dbg(rp, ifup, dev, "%s() irq %d\n", __func__, rp->irq);
rc = alloc_ring(dev);
- if (rc) {
- free_irq(rp->irq, dev);
- return rc;
- }
+ if (rc < 0)
+ goto out_free_irq;
+
alloc_rbufs(dev);
alloc_tbufs(dev);
rhine_chip_reset(dev);
@@ -1709,7 +1708,12 @@ static int rhine_open(struct net_device *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)