]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
micrel: use pci_zalloc_consistent
authorJoe Perches <joe@perches.com>
Thu, 26 Jun 2014 00:43:18 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 27 Jun 2014 04:21:50 +0000 (14:21 +1000)
Remove the now unnecessary memset too.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/net/ethernet/micrel/ksz884x.c

index 064a48d0c368a267826e2f77bacb2da9fa366e1e..cd5f106306d95e7a1b2bc3c1465da8f0d57a1e83 100644 (file)
@@ -4409,14 +4409,13 @@ static int ksz_alloc_desc(struct dev_info *adapter)
                DESC_ALIGNMENT;
 
        adapter->desc_pool.alloc_virt =
-               pci_alloc_consistent(
-                       adapter->pdev, adapter->desc_pool.alloc_size,
-                       &adapter->desc_pool.dma_addr);
+               pci_zalloc_consistent(adapter->pdev,
+                                     adapter->desc_pool.alloc_size,
+                                     &adapter->desc_pool.dma_addr);
        if (adapter->desc_pool.alloc_virt == NULL) {
                adapter->desc_pool.alloc_size = 0;
                return 1;
        }
-       memset(adapter->desc_pool.alloc_virt, 0, adapter->desc_pool.alloc_size);
 
        /* Align to the next cache line boundary. */
        offset = (((ulong) adapter->desc_pool.alloc_virt % DESC_ALIGNMENT) ?