[PATCH] crypto: ixp4xxx: Use dma_pool_zalloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use dma_pool_zalloc() instead of dma_pool_alloc + memset

Signed-off-by: Souptick Joarder <jrdr.linux@xxxxxxxxx>
---
 drivers/crypto/ixp4xx_crypto.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index 717a266..42e1403 100644
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -537,14 +537,13 @@ static void release_ixp_crypto(struct device *dev)

 static void reset_sa_dir(struct ix_sa_dir *dir)
 {
-	memset(dir->npe_ctx, 0, NPE_CTX_LEN);
 	dir->npe_ctx_idx = 0;
 	dir->npe_mode = 0;
 }

 static int init_sa_dir(struct ix_sa_dir *dir)
 {
-	dir->npe_ctx = dma_pool_alloc(ctx_pool, GFP_KERNEL, &dir->npe_ctx_phys);
+	dir->npe_ctx = dma_pool_zalloc(ctx_pool, GFP_KERNEL, &dir->npe_ctx_phys);
 	if (!dir->npe_ctx) {
 		return -ENOMEM;
 	}
--
1.9.1




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux