diff options
Diffstat (limited to 'drivers/net/e1000e/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 9b3f0a996b00..0adcb79e6386 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -2059,10 +2059,9 @@ int e1000e_setup_tx_resources(struct e1000_adapter *adapter) | |||
2059 | int err = -ENOMEM, size; | 2059 | int err = -ENOMEM, size; |
2060 | 2060 | ||
2061 | size = sizeof(struct e1000_buffer) * tx_ring->count; | 2061 | size = sizeof(struct e1000_buffer) * tx_ring->count; |
2062 | tx_ring->buffer_info = vmalloc(size); | 2062 | tx_ring->buffer_info = vzalloc(size); |
2063 | if (!tx_ring->buffer_info) | 2063 | if (!tx_ring->buffer_info) |
2064 | goto err; | 2064 | goto err; |
2065 | memset(tx_ring->buffer_info, 0, size); | ||
2066 | 2065 | ||
2067 | /* round up to nearest 4K */ | 2066 | /* round up to nearest 4K */ |
2068 | tx_ring->size = tx_ring->count * sizeof(struct e1000_tx_desc); | 2067 | tx_ring->size = tx_ring->count * sizeof(struct e1000_tx_desc); |
@@ -2095,10 +2094,9 @@ int e1000e_setup_rx_resources(struct e1000_adapter *adapter) | |||
2095 | int i, size, desc_len, err = -ENOMEM; | 2094 | int i, size, desc_len, err = -ENOMEM; |
2096 | 2095 | ||
2097 | size = sizeof(struct e1000_buffer) * rx_ring->count; | 2096 | size = sizeof(struct e1000_buffer) * rx_ring->count; |
2098 | rx_ring->buffer_info = vmalloc(size); | 2097 | rx_ring->buffer_info = vzalloc(size); |
2099 | if (!rx_ring->buffer_info) | 2098 | if (!rx_ring->buffer_info) |
2100 | goto err; | 2099 | goto err; |
2101 | memset(rx_ring->buffer_info, 0, size); | ||
2102 | 2100 | ||
2103 | for (i = 0; i < rx_ring->count; i++) { | 2101 | for (i = 0; i < rx_ring->count; i++) { |
2104 | buffer_info = &rx_ring->buffer_info[i]; | 2102 | buffer_info = &rx_ring->buffer_info[i]; |