From: Joe Perches Date: Fri, 8 Aug 2014 21:24:14 +0000 (-0700) Subject: crypto: use pci_zalloc_consistent X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7e835084fe1fff705be16e1db8a9e5e8f56b9b73;p=linux-beck.git crypto: use pci_zalloc_consistent Remove the now unnecessary memset too. Signed-off-by: Joe Perches Herbert Xu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index 12fea3e22348..8d2a7728434d 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -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;