irda: use pci_zalloc_consistent
authorJoe Perches <joe@perches.com>
Fri, 8 Aug 2014 21:24:36 +0000 (14:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Aug 2014 22:57:29 +0000 (15:57 -0700)
Remove the now unnecessary memset too.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/irda/vlsi_ir.c

index 485006604bbc0da7716e754485c945f064c5188e..58ef59469dd06eaed770fbd7c6b3f1cf25761053 100644 (file)
@@ -485,13 +485,13 @@ static int vlsi_create_hwif(vlsi_irda_dev_t *idev)
        idev->virtaddr = NULL;
        idev->busaddr = 0;
 
-       ringarea = pci_alloc_consistent(idev->pdev, HW_RING_AREA_SIZE, &idev->busaddr);
+       ringarea = pci_zalloc_consistent(idev->pdev, HW_RING_AREA_SIZE,
+                                        &idev->busaddr);
        if (!ringarea) {
                IRDA_ERROR("%s: insufficient memory for descriptor rings\n",
                           __func__);
                goto out;
        }
-       memset(ringarea, 0, HW_RING_AREA_SIZE);
 
        hwmap = (struct ring_descr_hw *)ringarea;
        idev->rx_ring = vlsi_alloc_ring(idev->pdev, hwmap, ringsize[1],