From 327883c3c93692cca32d20a7f59b07f5c3d0c5c8 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Mon, 3 Apr 2023 11:40:26 +0800 Subject: [PATCH] boot: vbe_simple: Fix vbe_simple_read_bootflow() dependency vbe_simple_read_bootflow() calls vbe_simple_read_bootflow_fw() which is only available when BOOTMETH_VBE_SIMPLE_FW is on. Signed-off-by: Bin Meng Reviewed-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- boot/vbe_simple.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/boot/vbe_simple.c b/boot/vbe_simple.c index 59676d8613..12682abd39 100644 --- a/boot/vbe_simple.c +++ b/boot/vbe_simple.c @@ -148,11 +148,13 @@ static int vbe_simple_read_bootflow(struct udevice *dev, struct bootflow *bflow) { int ret; - if (vbe_phase() == VBE_PHASE_FIRMWARE) { - ret = vbe_simple_read_bootflow_fw(dev, bflow); - if (ret) - return log_msg_ret("fw", ret); - return 0; + if (CONFIG_IS_ENABLED(BOOTMETH_VBE_SIMPLE_FW)) { + if (vbe_phase() == VBE_PHASE_FIRMWARE) { + ret = vbe_simple_read_bootflow_fw(dev, bflow); + if (ret) + return log_msg_ret("fw", ret); + return 0; + } } return -EINVAL; -- 2.39.5