VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> 2020-10-05 22:46:28 +0800 committer: Herbert Xu <herbert@gondor.apana.org.au> 2020-10-08 16:38:06 +1100 commit: 4f28945da0c502c794eb4e4d535d3ba65d3c9769 parent: 10a2f0b311094ffd45463a529a410a51ca025f27
Commit Summary:
X.509: fix error return value on the failed path
Diffstat:
1 file changed, 3 insertions, 1 deletion
diff --git a/crypto/asymmetric_keys/public_key_sm2.c b/crypto/asymmetric_keys/public_key_sm2.c
index 7325cf21dbb4..66b614e1eccd 100644
--- a/crypto/asymmetric_keys/public_key_sm2.c
+++ b/crypto/asymmetric_keys/public_key_sm2.c
@@ -36,8 +36,10 @@ int cert_sig_digest_update(const struct public_key_signature *sig,
 
 	desc_size = crypto_shash_descsize(tfm) + sizeof(*desc);
 	desc = kzalloc(desc_size, GFP_KERNEL);
-	if (!desc)
+	if (!desc) {
+		ret = -ENOMEM;
 		goto error_free_tfm;
+	}
 
 	desc->tfm = tfm;