Skip to contentSkip to conversation

arm64: kexec_file: Fix sparse warning

PATCH New Will Deacon 1 participant 1 message Nov 9, 2020 arm64

lore
Share & tools
lore

Will Deacon

author maintainer
#0 lore raw

PATCH 1/1 arm64: kexec_file: Fix sparse warning

Sparse gets cross about us returning 0 from image_load(), which has a return type of 'void *':

Quoted 1 line
Quoted 1 line

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.

---
 arch/arm64/kernel/kexec_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/kexec_image.c +1 -1
index 66adee8b5fc8..9ec34690e255 100644
@@ -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
Signature · 7 lines
2.29.2.222.g5d2a92d10f8-goog


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel