Skip to content

Commit

Permalink
crypto: testmgr - Set err before proceeding
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Salvatore Benedetto authored and Herbert Xu committed Jul 5, 2016
1 parent 6889621 commit 57763f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/testmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 57763f5

Please sign in to comment.