mb/qemu/fw_cfg: Fix return code check for fw_cfg_e820_select()

Change-Id: I22b9eb6ead37dbba6807d145468843bd01c94c84
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43445
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Nico Huber 2020-07-14 12:21:19 +02:00 committed by Nico Huber
parent ef59c93f77
commit d2245d890b
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ uintptr_t fw_cfg_tolud(void)
uint64_t top = 0;
uint32_t size = 0, pos = 0;
if (fw_cfg_e820_select(&size)) {
if (fw_cfg_e820_select(&size) == 0) {
while (!fw_cfg_e820_read(&e, &size, &pos)) {
uint64_t limit = e.address + e.length;
if (e.type == 1 && limit < 4ULL * GiB && limit > top)