Skip to contentSkip to conversation

crypto: algif - use kmalloc instead of kzalloc

PATCH Applied Tadeusz Struk 2 participants 2 messages Mar 30, 2015 – Apr 1, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: algif - use kmalloc instead of kzalloc

No need to use kzalloc to allocate sgls as the structure is initialized anyway.

---
 crypto/algif_skcipher.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/algif_skcipher.c +1 -1
index 9492dd5..5fd631f 100644
@@ -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;