powerpc/crash: remove unnecessary NULL check before kvfree()
PATCH 1/1 powerpc/crash: remove unnecessary NULL check before kvfree()
Fix the following coccicheck build warning:
arch/powerpc/kexec/crash.c:488:2-8: WARNING: NULL check before some freeing functions is not needed.
Reported-by kernel test robot <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Stephen Rothwell <[email protected]>
Signed-off-by Sourabh Jain <[email protected]>
--- arch/powerpc/kexec/crash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/kexec/crash.c +1 -2
@@ -484,8 +484,7 @@ static void update_crash_elfcorehdr(struct kimage *image, struct memory_notify * } out:kvfree (cmem); -if (elfbuf) -kvfree (elfbuf); +kvfree (elfbuf); }/**
Signature · 1 line
2.44.0
Michael Ellerman
AppliedQuoted 6 lines · Sourabh Jain
Fix the following coccicheck build warning:
arch/powerpc/kexec/crash.c:488:2-8: WARNING: NULL check before some freeing functions is not needed.
Applied to powerpc/topic/kdump-hotplug.
[1/1] powerpc/crash: remove unnecessary NULL check before kvfree()
https://git.kernel.org/powerpc/c/9803af291162dbca4b9773586a3f5c392f0dd974
cheers