aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igbvf/netdev.c
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/igbvf/netdev.c
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/igbvf/netdev.c')
-rw-r--r--drivers/net/igbvf/netdev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 4c998b7726da..8dbde2397c10 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -430,10 +430,9 @@ int igbvf_setup_tx_resources(struct igbvf_adapter *adapter,
430 int size; 430 int size;
431 431
432 size = sizeof(struct igbvf_buffer) * tx_ring->count; 432 size = sizeof(struct igbvf_buffer) * tx_ring->count;
433 tx_ring->buffer_info = vmalloc(size); 433 tx_ring->buffer_info = vzalloc(size);
434 if (!tx_ring->buffer_info) 434 if (!tx_ring->buffer_info)
435 goto err; 435 goto err;
436 memset(tx_ring->buffer_info, 0, size);
437 436
438 /* round up to nearest 4K */ 437 /* round up to nearest 4K */
439 tx_ring->size = tx_ring->count * sizeof(union e1000_adv_tx_desc); 438 tx_ring->size = tx_ring->count * sizeof(union e1000_adv_tx_desc);
@@ -470,10 +469,9 @@ int igbvf_setup_rx_resources(struct igbvf_adapter *adapter,
470 int size, desc_len; 469 int size, desc_len;
471 470
472 size = sizeof(struct igbvf_buffer) * rx_ring->count; 471 size = sizeof(struct igbvf_buffer) * rx_ring->count;
473 rx_ring->buffer_info = vmalloc(size); 472 rx_ring->buffer_info = vzalloc(size);
474 if (!rx_ring->buffer_info) 473 if (!rx_ring->buffer_info)
475 goto err; 474 goto err;
476 memset(rx_ring->buffer_info, 0, size);
477 475
478 desc_len = sizeof(union e1000_adv_rx_desc); 476 desc_len = sizeof(union e1000_adv_rx_desc);
479 477