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

Signed-off-by: Joe Perches <joe@perches.com>
Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/crypto/hifn_795x.c

index 12fea3e..8d2a772 100644 (file)
@@ -2617,14 +2617,13 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                }
        }
 
-       dev->desc_virt = pci_alloc_consistent(pdev, sizeof(struct hifn_dma),
-                       &dev->desc_dma);
+       dev->desc_virt = pci_zalloc_consistent(pdev, sizeof(struct hifn_dma),
+                                              &dev->desc_dma);
        if (!dev->desc_virt) {
                dprintk("Failed to allocate descriptor rings.\n");
                err = -ENOMEM;
                goto err_out_unmap_bars;
        }
-       memset(dev->desc_virt, 0, sizeof(struct hifn_dma));
 
        dev->pdev = pdev;
        dev->irq = pdev->irq;