aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igbvf
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-02-03 12:43:58 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-04 13:22:33 -0500
commitb2adaca92c63b9bb8beb021d554f656e387a7648 (patch)
treeec0ca7c14267dc090435ddbefe29b110912b851f /drivers/net/ethernet/intel/igbvf
parent09da6c5f60ad2e2018366e47192a9ddbccfb3ac5 (diff)
ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups
alloc failures already get standardized OOM messages and a dump_stack. Convert kzalloc's with multiplies to kcalloc. Convert kmalloc's with multiplies to kmalloc_array. Fix a few whitespace defects. Convert a constant 6 to ETH_ALEN. Use parentheses around sizeof. Convert vmalloc/memset to vzalloc. Remove now unused size variables. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/igbvf')
-rw-r--r--drivers/net/ethernet/intel/igbvf/netdev.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index 8224889e6845..f53f7136e508 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -1399,12 +1399,10 @@ static void igbvf_set_multi(struct net_device *netdev)
1399 int i; 1399 int i;
1400 1400
1401 if (!netdev_mc_empty(netdev)) { 1401 if (!netdev_mc_empty(netdev)) {
1402 mta_list = kmalloc(netdev_mc_count(netdev) * 6, GFP_ATOMIC); 1402 mta_list = kmalloc_array(netdev_mc_count(netdev), ETH_ALEN,
1403 if (!mta_list) { 1403 GFP_ATOMIC);
1404 dev_err(&adapter->pdev->dev, 1404 if (!mta_list)
1405 "failed to allocate multicast filter list\n");
1406 return; 1405 return;
1407 }
1408 } 1406 }
1409 1407
1410 /* prepare a packed array of only addresses. */ 1408 /* prepare a packed array of only addresses. */