diff options
Diffstat (limited to 'arch/x86/kernel/check.c')
-rw-r--r-- | arch/x86/kernel/check.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c index 2ac0ab71412a..fc999e6fc46a 100644 --- a/arch/x86/kernel/check.c +++ b/arch/x86/kernel/check.c | |||
@@ -83,15 +83,15 @@ void __init setup_bios_corruption_check(void) | |||
83 | u64 size; | 83 | u64 size; |
84 | addr = find_e820_area_size(addr, &size, PAGE_SIZE); | 84 | addr = find_e820_area_size(addr, &size, PAGE_SIZE); |
85 | 85 | ||
86 | if (addr == 0) | 86 | if (!(addr + 1)) |
87 | break; | ||
88 | |||
89 | if (addr >= corruption_check_size) | ||
87 | break; | 90 | break; |
88 | 91 | ||
89 | if ((addr + size) > corruption_check_size) | 92 | if ((addr + size) > corruption_check_size) |
90 | size = corruption_check_size - addr; | 93 | size = corruption_check_size - addr; |
91 | 94 | ||
92 | if (size == 0) | ||
93 | break; | ||
94 | |||
95 | e820_update_range(addr, size, E820_RAM, E820_RESERVED); | 95 | e820_update_range(addr, size, E820_RAM, E820_RESERVED); |
96 | scan_areas[num_scan_areas].addr = addr; | 96 | scan_areas[num_scan_areas].addr = addr; |
97 | scan_areas[num_scan_areas].size = size; | 97 | scan_areas[num_scan_areas].size = size; |