Skip to content

Commit e4a0bd0

Browse files
kragnizKAGA-KOKO
authored andcommitted
x86/boot/KASLR: Always return a value from process_mem_region
When compiling with -Wreturn-type, clang warns: arch/x86/boot/compressed/kaslr.c:704:1: warning: control may reach end of non-void function [-Wreturn-type] This function's return statement should have been placed outside the ifdeffed region. Move it there. Fixes: 690eaa5 ("x86/boot/KASLR: Limit KASLR to extract the kernel in immovable memory only") Signed-off-by: Louis Taylor <louis@kragniz.eu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Cc: bp@alien8.de Cc: hpa@zytor.com Cc: fanc.fnst@cn.fujitsu.com Cc: bhe@redhat.com Cc: kirill.shutemov@linux.intel.com Cc: jflat@chromium.org Link: https://lkml.kernel.org/r/20190302184929.28971-1-louis@kragniz.eu
1 parent 6f913de commit e4a0bd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/boot/compressed/kaslr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,8 @@ static bool process_mem_region(struct mem_vector *region,
697697
return 1;
698698
}
699699
}
700-
return 0;
701700
#endif
701+
return 0;
702702
}
703703

704704
#ifdef CONFIG_EFI

0 commit comments

Comments
 (0)