From: Joe Perches Date: Thu, 26 Jun 2014 00:43:16 +0000 (+1000) Subject: crypto: use pci_zalloc_consistent X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=886feaf10554305301e22a6234839c6008d5546f;p=karo-tx-linux.git crypto: use pci_zalloc_consistent Remove the now unnecessary memset too. Signed-off-by: Joe Perches Herbert Xu Signed-off-by: Andrew Morton --- 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;