diff mbox

crypto: testmgr - Set err before proceeding

Message ID 1467625954-2707-1-git-send-email-salvatore.benedetto@intel.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Salvatore Benedetto July 4, 2016, 9:52 a.m. UTC
Report correct error in case of failure

Signed-off-by: Salvatore Benedetto <salvatore.benedetto@intel.com>
---
 crypto/testmgr.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Herbert Xu July 5, 2016, 3:15 p.m. UTC | #1
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 <salvatore.benedetto@intel.com>

Patch applied.  Thanks.
diff mbox

Patch

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)