aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-11-21 19:15:06 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-28 01:53:38 -0500
commit89bf67f1f080c947c92f8773482d9e57767ca292 (patch)
treeae492f5f31a32a4f838778cd34320da0bedf9dfd /drivers/net/igb
parentfe6d2a38b2076cba515dc95b5dc1589a7ab51c17 (diff)
drivers/net: use vzalloc()
Use vzalloc() and vzalloc_node() in net drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Jon Mason <jon.mason@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb')
-rw-r--r--drivers/net/igb/igb_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 892d196f17ac..67ea262e482a 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2436,10 +2436,9 @@ int igb_setup_tx_resources(struct igb_ring *tx_ring)
2436 int size; 2436 int size;
2437 2437
2438 size = sizeof(struct igb_buffer) * tx_ring->count; 2438 size = sizeof(struct igb_buffer) * tx_ring->count;
2439 tx_ring->buffer_info = vmalloc(size); 2439 tx_ring->buffer_info = vzalloc(size);
2440 if (!tx_ring->buffer_info) 2440 if (!tx_ring->buffer_info)
2441 goto err; 2441 goto err;
2442 memset(tx_ring->buffer_info, 0, size);
2443 2442
2444 /* round up to nearest 4K */ 2443 /* round up to nearest 4K */
2445 tx_ring->size = tx_ring->count * sizeof(union e1000_adv_tx_desc); 2444 tx_ring->size = tx_ring->count * sizeof(union e1000_adv_tx_desc);
@@ -2587,10 +2586,9 @@ int igb_setup_rx_resources(struct igb_ring *rx_ring)
2587 int size, desc_len; 2586 int size, desc_len;
2588 2587
2589 size = sizeof(struct igb_buffer) * rx_ring->count; 2588 size = sizeof(struct igb_buffer) * rx_ring->count;
2590 rx_ring->buffer_info = vmalloc(size); 2589 rx_ring->buffer_info = vzalloc(size);
2591 if (!rx_ring->buffer_info) 2590 if (!rx_ring->buffer_info)
2592 goto err; 2591 goto err;
2593 memset(rx_ring->buffer_info, 0, size);
2594 2592
2595 desc_len = sizeof(union e1000_adv_rx_desc); 2593 desc_len = sizeof(union e1000_adv_rx_desc);
2596 2594