aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbevf
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbevf')
-rw-r--r--drivers/net/ixgbevf/ixgbevf_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c
index 5b8063cb4e6c..2216a3c8b12b 100644
--- a/drivers/net/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ixgbevf/ixgbevf_main.c
@@ -2489,10 +2489,9 @@ int ixgbevf_setup_tx_resources(struct ixgbevf_adapter *adapter,
2489 int size; 2489 int size;
2490 2490
2491 size = sizeof(struct ixgbevf_tx_buffer) * tx_ring->count; 2491 size = sizeof(struct ixgbevf_tx_buffer) * tx_ring->count;
2492 tx_ring->tx_buffer_info = vmalloc(size); 2492 tx_ring->tx_buffer_info = vzalloc(size);
2493 if (!tx_ring->tx_buffer_info) 2493 if (!tx_ring->tx_buffer_info)
2494 goto err; 2494 goto err;
2495 memset(tx_ring->tx_buffer_info, 0, size);
2496 2495
2497 /* round up to nearest 4K */ 2496 /* round up to nearest 4K */
2498 tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc); 2497 tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
@@ -2556,14 +2555,13 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_adapter *adapter,
2556 int size; 2555 int size;
2557 2556
2558 size = sizeof(struct ixgbevf_rx_buffer) * rx_ring->count; 2557 size = sizeof(struct ixgbevf_rx_buffer) * rx_ring->count;
2559 rx_ring->rx_buffer_info = vmalloc(size); 2558 rx_ring->rx_buffer_info = vzalloc(size);
2560 if (!rx_ring->rx_buffer_info) { 2559 if (!rx_ring->rx_buffer_info) {
2561 hw_dbg(&adapter->hw, 2560 hw_dbg(&adapter->hw,
2562 "Unable to vmalloc buffer memory for " 2561 "Unable to vmalloc buffer memory for "
2563 "the receive descriptor ring\n"); 2562 "the receive descriptor ring\n");
2564 goto alloc_failed; 2563 goto alloc_failed;
2565 } 2564 }
2566 memset(rx_ring->rx_buffer_info, 0, size);
2567 2565
2568 /* Round up to nearest 4K */ 2566 /* Round up to nearest 4K */
2569 rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc); 2567 rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);