]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
boot: vbe_simple: Fix vbe_simple_read_bootflow() dependency
authorBin Meng <bmeng@tinylab.org>
Mon, 3 Apr 2023 03:40:26 +0000 (11:40 +0800)
committerSimon Glass <sjg@chromium.org>
Fri, 28 Apr 2023 17:30:17 +0000 (11:30 -0600)
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 <bmeng@tinylab.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
boot/vbe_simple.c

index 59676d8613f61ec68c33a58e3fec8148a3c6099a..12682abd3996c54eb7d01b2dc4e33c4b62833e10 100644 (file)
@@ -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;