netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] crypto: algif - use kmalloc instead of kzalloc
@ 2015-03-30 21:25 Tadeusz Struk
  2015-04-01 19:33 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Tadeusz Struk @ 2015-03-30 21:25 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-crypto, herbert

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(-)

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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] crypto: algif - use kmalloc instead of kzalloc
  2015-03-30 21:25 [PATCH net-next] crypto: algif - use kmalloc instead of kzalloc Tadeusz Struk
@ 2015-04-01 19:33 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-04-01 19:33 UTC (permalink / raw)
  To: tadeusz.struk; +Cc: netdev, linux-crypto, herbert

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-01 19:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-30 21:25 [PATCH net-next] crypto: algif - use kmalloc instead of kzalloc Tadeusz Struk
2015-04-01 19:33 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).