]> git.baikalelectronics.ru Git - kernel.git/commit
x86/boot/KASLR: Always return a value from process_mem_region
authorLouis Taylor <louis@kragniz.eu>
Sat, 2 Mar 2019 18:49:29 +0000 (18:49 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 6 Mar 2019 21:55:30 +0000 (22:55 +0100)
commitefdb9b708a714d64e17dcdb2b81f65d62b9363e4
tree04ca3e75b705184584f986580fd2b6b46d6b0a83
parent761bbeaea16f979b3a88aa6a383e7d94eee3d2d4
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: ad3cc2ff2e3b ("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
arch/x86/boot/compressed/kaslr.c