From d2245d890b61ae62251fcd89040637c2eb3071b7 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Tue, 14 Jul 2020 12:21:19 +0200 Subject: [PATCH] mb/qemu/fw_cfg: Fix return code check for fw_cfg_e820_select() Change-Id: I22b9eb6ead37dbba6807d145468843bd01c94c84 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/coreboot/+/43445 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/mainboard/emulation/qemu-i440fx/fw_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c index 6ee6863dfe..d6caedf764 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c @@ -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)