diff options
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index caa8192fff2a..211a1694667e 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -669,13 +669,12 @@ ixgb_setup_tx_resources(struct ixgb_adapter *adapter) | |||
669 | int size; | 669 | int size; |
670 | 670 | ||
671 | size = sizeof(struct ixgb_buffer) * txdr->count; | 671 | size = sizeof(struct ixgb_buffer) * txdr->count; |
672 | txdr->buffer_info = vmalloc(size); | 672 | txdr->buffer_info = vzalloc(size); |
673 | if (!txdr->buffer_info) { | 673 | if (!txdr->buffer_info) { |
674 | netif_err(adapter, probe, adapter->netdev, | 674 | netif_err(adapter, probe, adapter->netdev, |
675 | "Unable to allocate transmit descriptor ring memory\n"); | 675 | "Unable to allocate transmit descriptor ring memory\n"); |
676 | return -ENOMEM; | 676 | return -ENOMEM; |
677 | } | 677 | } |
678 | memset(txdr->buffer_info, 0, size); | ||
679 | 678 | ||
680 | /* round up to nearest 4K */ | 679 | /* round up to nearest 4K */ |
681 | 680 | ||
@@ -759,13 +758,12 @@ ixgb_setup_rx_resources(struct ixgb_adapter *adapter) | |||
759 | int size; | 758 | int size; |
760 | 759 | ||
761 | size = sizeof(struct ixgb_buffer) * rxdr->count; | 760 | size = sizeof(struct ixgb_buffer) * rxdr->count; |
762 | rxdr->buffer_info = vmalloc(size); | 761 | rxdr->buffer_info = vzalloc(size); |
763 | if (!rxdr->buffer_info) { | 762 | if (!rxdr->buffer_info) { |
764 | netif_err(adapter, probe, adapter->netdev, | 763 | netif_err(adapter, probe, adapter->netdev, |
765 | "Unable to allocate receive descriptor ring\n"); | 764 | "Unable to allocate receive descriptor ring\n"); |
766 | return -ENOMEM; | 765 | return -ENOMEM; |
767 | } | 766 | } |
768 | memset(rxdr->buffer_info, 0, size); | ||
769 | 767 | ||
770 | /* Round up to nearest 4K */ | 768 | /* Round up to nearest 4K */ |
771 | 769 | ||