diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-22 01:15:06 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-28 07:53:38 +0100 |
commit | 89bf67f1f080c947c92f8773482d9e57767ca292 (patch) | |
tree | ae492f5f31a32a4f838778cd34320da0bedf9dfd /drivers/net/e1000/e1000_main.c | |
parent | be2net: adding support for Lancer family of CNAs (diff) | |
download | linux-89bf67f1f080c947c92f8773482d9e57767ca292.tar.xz linux-89bf67f1f080c947c92f8773482d9e57767ca292.zip |
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/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 4686c3983fc3..dcb7f82c2701 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -1425,13 +1425,12 @@ static int e1000_setup_tx_resources(struct e1000_adapter *adapter, int size; size = sizeof(struct e1000_buffer) * txdr->count; - txdr->buffer_info = vmalloc(size); + txdr->buffer_info = vzalloc(size); if (!txdr->buffer_info) { e_err(probe, "Unable to allocate memory for the Tx descriptor " "ring\n"); return -ENOMEM; } - memset(txdr->buffer_info, 0, size); /* round up to nearest 4K */ @@ -1621,13 +1620,12 @@ static int e1000_setup_rx_resources(struct e1000_adapter *adapter, int size, desc_len; size = sizeof(struct e1000_buffer) * rxdr->count; - rxdr->buffer_info = vmalloc(size); + rxdr->buffer_info = vzalloc(size); if (!rxdr->buffer_info) { e_err(probe, "Unable to allocate memory for the Rx descriptor " "ring\n"); return -ENOMEM; } - memset(rxdr->buffer_info, 0, size); desc_len = sizeof(struct e1000_rx_desc); |