diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/igb/igb_main.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 4853a74843ec..d6dda1621166 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -2464,7 +2464,7 @@ static void igb_set_multi(struct net_device *netdev) | |||
2464 | struct e1000_hw *hw = &adapter->hw; | 2464 | struct e1000_hw *hw = &adapter->hw; |
2465 | struct e1000_mac_info *mac = &hw->mac; | 2465 | struct e1000_mac_info *mac = &hw->mac; |
2466 | struct dev_mc_list *mc_ptr; | 2466 | struct dev_mc_list *mc_ptr; |
2467 | u8 *mta_list; | 2467 | u8 *mta_list = NULL; |
2468 | u32 rctl; | 2468 | u32 rctl; |
2469 | int i; | 2469 | int i; |
2470 | 2470 | ||
@@ -2485,17 +2485,15 @@ static void igb_set_multi(struct net_device *netdev) | |||
2485 | } | 2485 | } |
2486 | wr32(E1000_RCTL, rctl); | 2486 | wr32(E1000_RCTL, rctl); |
2487 | 2487 | ||
2488 | if (!netdev->mc_count) { | 2488 | if (netdev->mc_count) { |
2489 | /* nothing to program, so clear mc list */ | 2489 | mta_list = kzalloc(netdev->mc_count * 6, GFP_ATOMIC); |
2490 | igb_update_mc_addr_list(hw, NULL, 0, 1, | 2490 | if (!mta_list) { |
2491 | mac->rar_entry_count); | 2491 | dev_err(&adapter->pdev->dev, |
2492 | return; | 2492 | "failed to allocate multicast filter list\n"); |
2493 | return; | ||
2494 | } | ||
2493 | } | 2495 | } |
2494 | 2496 | ||
2495 | mta_list = kzalloc(netdev->mc_count * 6, GFP_ATOMIC); | ||
2496 | if (!mta_list) | ||
2497 | return; | ||
2498 | |||
2499 | /* The shared function expects a packed array of only addresses. */ | 2497 | /* The shared function expects a packed array of only addresses. */ |
2500 | mc_ptr = netdev->mc_list; | 2498 | mc_ptr = netdev->mc_list; |
2501 | 2499 | ||