Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135362
b: refs/heads/master
c: c5cd11e
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Mar 21, 2009
1 parent a6f6bf1 commit 0404fac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e340485725ea35ca4e354cce5df09e86e31e20d
refs/heads/master: c5cd11e380002d24fd4fd4c0fc38f59ab394e885
18 changes: 8 additions & 10 deletions trunk/drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2464,7 +2464,7 @@ static void igb_set_multi(struct net_device *netdev)
struct e1000_hw *hw = &adapter->hw;
struct e1000_mac_info *mac = &hw->mac;
struct dev_mc_list *mc_ptr;
u8 *mta_list;
u8 *mta_list = NULL;
u32 rctl;
int i;

Expand All @@ -2485,17 +2485,15 @@ static void igb_set_multi(struct net_device *netdev)
}
wr32(E1000_RCTL, rctl);

if (!netdev->mc_count) {
/* nothing to program, so clear mc list */
igb_update_mc_addr_list(hw, NULL, 0, 1,
mac->rar_entry_count);
return;
if (netdev->mc_count) {
mta_list = kzalloc(netdev->mc_count * 6, GFP_ATOMIC);
if (!mta_list) {
dev_err(&adapter->pdev->dev,
"failed to allocate multicast filter list\n");
return;
}
}

mta_list = kzalloc(netdev->mc_count * 6, GFP_ATOMIC);
if (!mta_list)
return;

/* The shared function expects a packed array of only addresses. */
mc_ptr = netdev->mc_list;

Expand Down

0 comments on commit 0404fac

Please sign in to comment.