From: Salvatore Benedetto Date: Mon, 4 Jul 2016 09:52:34 +0000 (+0100) Subject: crypto: testmgr - Set err before proceeding X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=57763f5ec7488d5864e4d6ec9d4197b8f52214bd;p=deliverable%2Flinux.git crypto: testmgr - Set err before proceeding Report correct error in case of failure Signed-off-by: Salvatore Benedetto Signed-off-by: Herbert Xu --- 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)