summaryrefslogtreecommitdiff
path: root/crypto/testmgr.c
diff options
context:
space:
mode:
authorSalvatore Benedetto <salvatore.benedetto@intel.com>2016-07-04 12:52:34 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2016-07-05 18:05:22 +0300
commit57763f5ec7488d5864e4d6ec9d4197b8f52214bd (patch)
tree83f149aaea8582e6439961d868afeae20760b022 /crypto/testmgr.c
parent6889621fd2317f52fd2c5ef1178128156f39fa94 (diff)
downloadlinux-57763f5ec7488d5864e4d6ec9d4197b8f52214bd.tar.xz
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/testmgr.c')
-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)