diff mbox

[net-next] crypto: algif - use kmalloc instead of kzalloc

Message ID 20150330212543.7179.25983.stgit@tstruk-mobl1 (mailing list archive)
State Not Applicable
Delegated to: Herbert Xu
Headers show

Commit Message

Tadeusz Struk March 30, 2015, 9:25 p.m. UTC
No need to use kzalloc to allocate sgls as the structure is initialized anyway.

Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
---
 crypto/algif_skcipher.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller April 1, 2015, 7:33 p.m. UTC | #1
From: Tadeusz Struk <tadeusz.struk@intel.com>
Date: Mon, 30 Mar 2015 14:25:44 -0700

> No need to use kzalloc to allocate sgls as the structure is initialized anyway.
> 
> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index 9492dd5..5fd631f 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -583,7 +583,7 @@  static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
 			rsgl = &sreq->first_sgl;
 			list_add_tail(&rsgl->list, &sreq->list);
 		} else {
-			rsgl = kzalloc(sizeof(*rsgl), GFP_KERNEL);
+			rsgl = kmalloc(sizeof(*rsgl), GFP_KERNEL);
 			if (!rsgl) {
 				err = -ENOMEM;
 				goto free;