]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
crypto: algif - use kmalloc instead of kzalloc
authorTadeusz Struk <tadeusz.struk@intel.com>
Mon, 30 Mar 2015 21:25:44 +0000 (14:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Apr 2015 19:32:35 +0000 (15:32 -0400)
No need to use kzalloc to allocate sgls as the structure is initialized anyway.

Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
crypto/algif_skcipher.c

index 60496d405ebf4a6cf0e4cf12d36ab3294617b1f3..2db1eb776932e0e525a807d236d9845da7a5826b 100644 (file)
@@ -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;