[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150330212543.7179.25983.stgit@tstruk-mobl1>
Date: Mon, 30 Mar 2015 14:25:44 -0700
From: Tadeusz Struk <tadeusz.struk@...el.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, linux-crypto@...r.kernel.org,
herbert@...dor.apana.org.au
Subject: [PATCH net-next] crypto: algif - use kmalloc instead of kzalloc
No need to use kzalloc to allocate sgls as the structure is initialized anyway.
Signed-off-by: Tadeusz Struk <tadeusz.struk@...el.com>
---
crypto/algif_skcipher.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists