2016-07-04 09:52:43

by Salvatore Benedetto

[permalink] [raw]
Subject: [PATCH] crypto: testmgr - Set err before proceeding

Report correct error in case of failure

Signed-off-by: Salvatore Benedetto <[email protected]>
---
crypto/testmgr.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 8ea0d3f..769cc2a 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)
--
2.7.4


2016-07-05 15:15:23

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: testmgr - Set err before proceeding

On Mon, Jul 04, 2016 at 10:52:34AM +0100, Salvatore Benedetto wrote:
> Report correct error in case of failure
>
> Signed-off-by: Salvatore Benedetto <[email protected]>

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt