From 886feaf10554305301e22a6234839c6008d5546f Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Thu, 26 Jun 2014 10:43:16 +1000 Subject: [PATCH] crypto: use pci_zalloc_consistent Remove the now unnecessary memset too. Signed-off-by: Joe Perches Herbert Xu Signed-off-by: Andrew Morton --- drivers/crypto/hifn_795x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; -- 2.39.5