Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Joe Perches and committed by
Linus Torvalds
7e835084 a5bbf616

+2 -3
+2 -3
drivers/crypto/hifn_795x.c
··· 2617 2617 } 2618 2618 } 2619 2619 2620 - dev->desc_virt = pci_alloc_consistent(pdev, sizeof(struct hifn_dma), 2621 - &dev->desc_dma); 2620 + dev->desc_virt = pci_zalloc_consistent(pdev, sizeof(struct hifn_dma), 2621 + &dev->desc_dma); 2622 2622 if (!dev->desc_virt) { 2623 2623 dprintk("Failed to allocate descriptor rings.\n"); 2624 2624 err = -ENOMEM; 2625 2625 goto err_out_unmap_bars; 2626 2626 } 2627 - memset(dev->desc_virt, 0, sizeof(struct hifn_dma)); 2628 2627 2629 2628 dev->pdev = pdev; 2630 2629 dev->irq = pdev->irq;