aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/b44.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/b44.c')
-rw-r--r--drivers/net/b44.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 09e1b4deae59..ecc2e32c38c1 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -1388,13 +1388,7 @@ static int b44_open(struct net_device *dev)
1388 1388
1389 err = b44_alloc_consistent(bp); 1389 err = b44_alloc_consistent(bp);
1390 if (err) 1390 if (err)
1391 return err; 1391 goto out;
1392
1393 err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev);
1394 if (err)
1395 goto err_out_free;
1396
1397 spin_lock_irq(&bp->lock);
1398 1392
1399 b44_init_rings(bp); 1393 b44_init_rings(bp);
1400 b44_init_hw(bp); 1394 b44_init_hw(bp);
@@ -1403,7 +1397,13 @@ static int b44_open(struct net_device *dev)
1403 netif_carrier_off(dev); 1397 netif_carrier_off(dev);
1404 b44_check_phy(bp); 1398 b44_check_phy(bp);
1405 1399
1406 spin_unlock_irq(&bp->lock); 1400 err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev);
1401 if (unlikely(err < 0)) {
1402 b44_chip_reset(bp);
1403 b44_free_rings(bp);
1404 b44_free_consistent(bp);
1405 goto out;
1406 }
1407 1407
1408 init_timer(&bp->timer); 1408 init_timer(&bp->timer);
1409 bp->timer.expires = jiffies + HZ; 1409 bp->timer.expires = jiffies + HZ;
@@ -1412,11 +1412,7 @@ static int b44_open(struct net_device *dev)
1412 add_timer(&bp->timer); 1412 add_timer(&bp->timer);
1413 1413
1414 b44_enable_ints(bp); 1414 b44_enable_ints(bp);
1415 1415out:
1416 return 0;
1417
1418err_out_free:
1419 b44_free_consistent(bp);
1420 return err; 1416 return err;
1421} 1417}
1422 1418