diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index 6d0bdedb2e20..9d979b2954ef 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -554,8 +554,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;