Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[platform/kernel/linux-rpi.git] / crypto / algif_skcipher.c
index 1e38aaa..a9e79d8 100644 (file)
@@ -566,8 +566,10 @@ static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
                         * need to expand */
                        tmp = kcalloc(tx_nents * 2, sizeof(*tmp),
                                      GFP_KERNEL);
-                       if (!tmp)
+                       if (!tmp) {
+                               err = -ENOMEM;
                                goto free;
+                       }
 
                        sg_init_table(tmp, tx_nents * 2);
                        for (x = 0; x < tx_nents; x++)