diff options
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 3b907196ca48..d4be23804933 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -5773,29 +5773,16 @@ bnx2_open(struct net_device *dev) | |||
5773 | bnx2_setup_int_mode(bp, disable_msi); | 5773 | bnx2_setup_int_mode(bp, disable_msi); |
5774 | bnx2_napi_enable(bp); | 5774 | bnx2_napi_enable(bp); |
5775 | rc = bnx2_alloc_mem(bp); | 5775 | rc = bnx2_alloc_mem(bp); |
5776 | if (rc) { | 5776 | if (rc) |
5777 | bnx2_napi_disable(bp); | 5777 | goto open_err; |
5778 | bnx2_free_mem(bp); | ||
5779 | return rc; | ||
5780 | } | ||
5781 | 5778 | ||
5782 | rc = bnx2_request_irq(bp); | 5779 | rc = bnx2_request_irq(bp); |
5783 | 5780 | if (rc) | |
5784 | if (rc) { | 5781 | goto open_err; |
5785 | bnx2_napi_disable(bp); | ||
5786 | bnx2_free_mem(bp); | ||
5787 | return rc; | ||
5788 | } | ||
5789 | 5782 | ||
5790 | rc = bnx2_init_nic(bp, 1); | 5783 | rc = bnx2_init_nic(bp, 1); |
5791 | 5784 | if (rc) | |
5792 | if (rc) { | 5785 | goto open_err; |
5793 | bnx2_napi_disable(bp); | ||
5794 | bnx2_free_irq(bp); | ||
5795 | bnx2_free_skbs(bp); | ||
5796 | bnx2_free_mem(bp); | ||
5797 | return rc; | ||
5798 | } | ||
5799 | 5786 | ||
5800 | mod_timer(&bp->timer, jiffies + bp->current_interval); | 5787 | mod_timer(&bp->timer, jiffies + bp->current_interval); |
5801 | 5788 | ||
@@ -5825,11 +5812,8 @@ bnx2_open(struct net_device *dev) | |||
5825 | rc = bnx2_request_irq(bp); | 5812 | rc = bnx2_request_irq(bp); |
5826 | 5813 | ||
5827 | if (rc) { | 5814 | if (rc) { |
5828 | bnx2_napi_disable(bp); | ||
5829 | bnx2_free_skbs(bp); | ||
5830 | bnx2_free_mem(bp); | ||
5831 | del_timer_sync(&bp->timer); | 5815 | del_timer_sync(&bp->timer); |
5832 | return rc; | 5816 | goto open_err; |
5833 | } | 5817 | } |
5834 | bnx2_enable_int(bp); | 5818 | bnx2_enable_int(bp); |
5835 | } | 5819 | } |
@@ -5842,6 +5826,13 @@ bnx2_open(struct net_device *dev) | |||
5842 | netif_start_queue(dev); | 5826 | netif_start_queue(dev); |
5843 | 5827 | ||
5844 | return 0; | 5828 | return 0; |
5829 | |||
5830 | open_err: | ||
5831 | bnx2_napi_disable(bp); | ||
5832 | bnx2_free_skbs(bp); | ||
5833 | bnx2_free_irq(bp); | ||
5834 | bnx2_free_mem(bp); | ||
5835 | return rc; | ||
5845 | } | 5836 | } |
5846 | 5837 | ||
5847 | static void | 5838 | static void |