aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/hifn_795x.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-08 17:24:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:28 -0400
commit7e835084fe1fff705be16e1db8a9e5e8f56b9b73 (patch)
tree0851686d85b19b5264b2102b41ff4b6d4e4b91c7 /drivers/crypto/hifn_795x.c
parenta5bbf6160c2b5ebce1533bf989c7cd0086beeabf (diff)
crypto: use pci_zalloc_consistent
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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/crypto/hifn_795x.c')
-rw-r--r--drivers/crypto/hifn_795x.c5
1 files 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)
2617 } 2617 }
2618 } 2618 }
2619 2619
2620 dev->desc_virt = pci_alloc_consistent(pdev, sizeof(struct hifn_dma), 2620 dev->desc_virt = pci_zalloc_consistent(pdev, sizeof(struct hifn_dma),
2621 &dev->desc_dma); 2621 &dev->desc_dma);
2622 if (!dev->desc_virt) { 2622 if (!dev->desc_virt) {
2623 dprintk("Failed to allocate descriptor rings.\n"); 2623 dprintk("Failed to allocate descriptor rings.\n");
2624 err = -ENOMEM; 2624 err = -ENOMEM;
2625 goto err_out_unmap_bars; 2625 goto err_out_unmap_bars;
2626 } 2626 }
2627 memset(dev->desc_virt, 0, sizeof(struct hifn_dma));
2628 2627
2629 dev->pdev = pdev; 2628 dev->pdev = pdev;
2630 dev->irq = pdev->irq; 2629 dev->irq = pdev->irq;