Commit e4a0bd03 authored by Louis Taylor's avatar Louis Taylor Committed by Thomas Gleixner

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: 690eaa53 ("x86/boot/KASLR: Limit KASLR to extract the kernel in immovable memory only")
Signed-off-by: default avatarLouis Taylor <louis@kragniz.eu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Reviewed-by: default avatarNick 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
parent 6f913de3
......@@ -697,8 +697,8 @@ static bool process_mem_region(struct mem_vector *region,
return 1;
}
}
return 0;
#endif
return 0;
}
#ifdef CONFIG_EFI
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment