crypto: algif - use kmalloc instead of kzalloc
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- crypto/algif_skcipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/algif_skcipher.c +1 -1
@@ -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;
From: Tadeusz Struk <[email protected]>
Date: Mon, 30 Mar 2015 14:25:44 -0700
Quoted 3 lines
No need to use kzalloc to allocate sgls as the structure is initialized anyway.
Signed-off-by Tadeusz Struk <[email protected]>
Applied.