Skip to content

Commit 9803af2

Browse files
sourabhjainsmpe
authored andcommitted
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]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Sourabh Jain <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent 849599b commit 9803af2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/powerpc/kexec/crash.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,7 @@ static void update_crash_elfcorehdr(struct kimage *image, struct memory_notify *
484484
}
485485
out:
486486
kvfree(cmem);
487-
if (elfbuf)
488-
kvfree(elfbuf);
487+
kvfree(elfbuf);
489488
}
490489

491490
/**

0 commit comments

Comments
 (0)