summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-08 14:24:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 15:57:28 -0700
commit7e835084fe1fff705be16e1db8a9e5e8f56b9b73 (patch)
tree0851686d85b19b5264b2102b41ff4b6d4e4b91c7 /drivers/crypto
parenta5bbf6160c2b5ebce1533bf989c7cd0086beeabf (diff)
downloadop-kernel-dev-7e835084fe1fff705be16e1db8a9e5e8f56b9b73.zip
op-kernel-dev-7e835084fe1fff705be16e1db8a9e5e8f56b9b73.tar.gz
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')
-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 12fea3e2..8d2a772 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;
OpenPOWER on IntegriCloud