diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index 037c321c5618..2edaed6803ff 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -528,8 +528,10 @@ static int kexec_calculate_store_digests(struct kimage *image) sha_region_sz = KEXEC_SEGMENT_MAX * sizeof(struct kexec_sha_region); sha_regions = vzalloc(sha_region_sz); - if (!sha_regions) + if (!sha_regions) { + ret = -ENOMEM; goto out_free_desc; + } desc->tfm = tfm; desc->flags = 0;