]> Git Repo - J-linux.git/commitdiff
x86/kaslr: Have process_mem_region() return a boolean
authorJing Yangyang <[email protected]>
Tue, 24 Aug 2021 07:05:15 +0000 (00:05 -0700)
committerBorislav Petkov <[email protected]>
Tue, 24 Aug 2021 08:54:15 +0000 (10:54 +0200)
Fix the following coccicheck warning:

  ./arch/x86/boot/compressed/kaslr.c:671:10-11:WARNING:return of 0/1
  in function 'process_mem_region' with return type bool

Generated by: scripts/coccinelle/misc/boolreturn.cocci

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Jing Yangyang <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
arch/x86/boot/compressed/kaslr.c

index e36690778497f3ac02e4c7b0b3a1f3bcb7d4ec21..67c3208b668aba525dd1196c4baafdc17438f0e9 100644 (file)
@@ -668,7 +668,7 @@ static bool process_mem_region(struct mem_vector *region,
 
                if (slot_area_index == MAX_SLOT_AREA) {
                        debug_putstr("Aborted e820/efi memmap scan when walking immovable regions(slot_areas full)!\n");
-                       return 1;
+                       return true;
                }
        }
 #endif
This page took 0.053054 seconds and 4 git commands to generate.