diff options
author | Will Deacon <[email protected]> | 2020-11-09 10:49:23 +0000 |
---|---|---|
committer | Will Deacon <[email protected]> | 2020-11-10 13:11:44 +0000 |
commit | 85f0b2fc917f8de4bca02d169ef7d23dbfc29155 (patch) | |
tree | 634d104c3acf59709394bb58a0b178c42b48eb25 | |
parent | f969f03888b9438fdb227b6460d99ede5737326d (diff) |
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 <[email protected]>
Reported-by: kernel test robot <[email protected]>
Fixes: 108aa503657e ("arm64: kexec_file: try more regions if loading segments fails")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
-rw-r--r-- | arch/arm64/kernel/kexec_image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/kexec_image.c b/arch/arm64/kernel/kexec_image.c index 66adee8b5fc8..9ec34690e255 100644 --- a/arch/arm64/kernel/kexec_image.c +++ b/arch/arm64/kernel/kexec_image.c @@ -127,7 +127,7 @@ static void *image_load(struct kimage *image, kernel_segment->mem, kbuf.bufsz, kernel_segment->memsz); - return 0; + return NULL; } #ifdef CONFIG_KEXEC_IMAGE_VERIFY_SIG |