summaryrefslogtreecommitdiffstats
path: root/crypto/asymmetric_keys/mscode_parser.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-07-24 01:31:37 +0200
committerDavid S. Miller <davem@davemloft.net>2016-07-24 06:53:32 +0200
commitde0ba9a0d8909996f9e293d311c2cc459fa77d67 (patch)
tree199214afc477824bf431d11d08834ff7555c994b /crypto/asymmetric_keys/mscode_parser.c
parentMerge branch 'macsec-gro' (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff)
downloadlinux-de0ba9a0d8909996f9e293d311c2cc459fa77d67.tar.xz
linux-de0ba9a0d8909996f9e293d311c2cc459fa77d67.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Just several instances of overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'crypto/asymmetric_keys/mscode_parser.c')
-rw-r--r--crypto/asymmetric_keys/mscode_parser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/asymmetric_keys/mscode_parser.c b/crypto/asymmetric_keys/mscode_parser.c
index 6a76d5c70ef6..9492e1c22d38 100644
--- a/crypto/asymmetric_keys/mscode_parser.c
+++ b/crypto/asymmetric_keys/mscode_parser.c
@@ -124,5 +124,10 @@ int mscode_note_digest(void *context, size_t hdrlen,
struct pefile_context *ctx = context;
ctx->digest = kmemdup(value, vlen, GFP_KERNEL);
- return ctx->digest ? 0 : -ENOMEM;
+ if (!ctx->digest)
+ return -ENOMEM;
+
+ ctx->digest_len = vlen;
+
+ return 0;
}