Skip to content

Commit 85f0b2f

Browse files
committed
arm64: kexec_file: Fix sparse warning
Sparse gets cross about us returning 0 from image_load(), which has a return type of 'void *': >> arch/arm64/kernel/kexec_image.c:130:16: sparse: sparse: Using plain integer as NULL pointer Return NULL instead, as we don't use the return value for anything if it does not indicate an error. Cc: Benjamin Gwin <bgwin@google.com> Reported-by: kernel test robot <lkp@intel.com> Fixes: 108aa50 ("arm64: kexec_file: try more regions if loading segments fails") Link: https://lore.kernel.org/r/202011091736.T0zH8kaC-lkp@intel.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent f969f03 commit 85f0b2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/arm64/kernel/kexec_image.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static void *image_load(struct kimage *image,
127127
kernel_segment->mem, kbuf.bufsz,
128128
kernel_segment->memsz);
129129

130-
return 0;
130+
return NULL;
131131
}
132132

133133
#ifdef CONFIG_KEXEC_IMAGE_VERIFY_SIG

0 commit comments

Comments
 (0)