]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
crypto: use pci_zalloc_consistent
authorJoe Perches <joe@perches.com>
Thu, 26 Jun 2014 00:43:16 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 27 Jun 2014 04:21:48 +0000 (14:21 +1000)
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>
drivers/crypto/hifn_795x.c

index 12fea3e223481fcb19485a8a3d6220050a7e3587..8d2a7728434d05cd06250e2c6fb2d74a3336bc88 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;