summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorSalvatore Benedetto <salvatore.benedetto@intel.com>2016-07-04 10:52:34 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2016-07-05 23:05:22 +0800
commit57763f5ec7488d5864e4d6ec9d4197b8f52214bd (patch)
tree83f149aaea8582e6439961d868afeae20760b022 /crypto
parent6889621fd2317f52fd2c5ef1178128156f39fa94 (diff)
downloadlinux-stable-57763f5ec7488d5864e4d6ec9d4197b8f52214bd.tar.gz
linux-stable-57763f5ec7488d5864e4d6ec9d4197b8f52214bd.tar.bz2
linux-stable-57763f5ec7488d5864e4d6ec9d4197b8f52214bd.zip
crypto: testmgr - Set err before proceeding
Report correct error in case of failure Signed-off-by: Salvatore Benedetto <salvatore.benedetto@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/testmgr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 8ea0d3fcb580..769cc2a88040 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -1941,6 +1941,7 @@ static int test_akcipher_one(struct crypto_akcipher *tfm,
if (err)
goto free_req;
+ err = -ENOMEM;
out_len_max = crypto_akcipher_maxsize(tfm);
outbuf_enc = kzalloc(out_len_max, GFP_KERNEL);
if (!outbuf_enc)