]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: kexec_file: Fix sparse warning
authorWill Deacon <will@kernel.org>
Mon, 9 Nov 2020 10:49:23 +0000 (10:49 +0000)
committerWill Deacon <will@kernel.org>
Tue, 10 Nov 2020 13:11:44 +0000 (13:11 +0000)
commit3df0991fba48589fc64978f58c21b51a32f3dbeb
tree634d104c3acf59709394bb58a0b178c42b48eb25
parentd4a317039df6c91b5535bb64af44eb5cc9f4f42d
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: 7abab5658b82 ("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>
arch/arm64/kernel/kexec_image.c