diff options
author | Louis Taylor <louis@kragniz.eu> | 2019-03-02 21:49:29 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-03-07 00:55:30 +0300 |
commit | e4a0bd0308f05c1354d28feec8439e869eae6372 (patch) | |
tree | 04ca3e75b705184584f986580fd2b6b46d6b0a83 /arch/x86/boot/compressed/kaslr.c | |
parent | 6f913de3231e1d70a871135b38219da7810df218 (diff) | |
download | linux-e4a0bd0308f05c1354d28feec8439e869eae6372.tar.xz |
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: 690eaa532057 ("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
Diffstat (limited to 'arch/x86/boot/compressed/kaslr.c')
-rw-r--r-- | arch/x86/boot/compressed/kaslr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index fa0332dda9f2..2e53c056ba20 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -697,8 +697,8 @@ static bool process_mem_region(struct mem_vector *region, return 1; } } - return 0; #endif + return 0; } #ifdef CONFIG_EFI |