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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
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)