x86/kaslr: Small cleanup of find_random_phys_addr()

Just a trivial rearrangement to do all the processing together, and only
have one call to slots_fetch_random() in the source.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200728225722.67457-18-nivedita@alum.mit.edu
This commit is contained in:
Arvind Sankar 2020-07-28 18:57:18 -04:00 committed by Ingo Molnar
parent eb38be6db5
commit 4268b4da57

View File

@ -813,10 +813,9 @@ static unsigned long find_random_phys_addr(unsigned long minimum,
return 0;
}
if (process_efi_entries(minimum, image_size))
return slots_fetch_random();
if (!process_efi_entries(minimum, image_size))
process_e820_entries(minimum, image_size);
process_e820_entries(minimum, image_size);
return slots_fetch_random();
}