drivers/net: use vzalloc()
[deliverable/linux.git] / drivers / net / e1000 / e1000_main.c
index 4686c3983fc3044f0e0af47cf75dee71b6dadb02..dcb7f82c27017af001c0a567de84d732efbb717b 100644 (file)
@@ -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);
 
This page took 0.034015 seconds and 5 git commands to generate.