Commit 7e835084 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

crypto: use pci_zalloc_consistent

Remove the now unnecessary memset too.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a5bbf616
...@@ -2617,14 +2617,13 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -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_virt = pci_zalloc_consistent(pdev, sizeof(struct hifn_dma),
&dev->desc_dma); &dev->desc_dma);
if (!dev->desc_virt) { if (!dev->desc_virt) {
dprintk("Failed to allocate descriptor rings.\n"); dprintk("Failed to allocate descriptor rings.\n");
err = -ENOMEM; err = -ENOMEM;
goto err_out_unmap_bars; goto err_out_unmap_bars;
} }
memset(dev->desc_virt, 0, sizeof(struct hifn_dma));
dev->pdev = pdev; dev->pdev = pdev;
dev->irq = pdev->irq; dev->irq = pdev->irq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment