]> git.baikalelectronics.ru Git - uboot.git/commitdiff
vbe: Avoid a build failure when bloblist is not enabled
authorSimon Glass <sjg@chromium.org>
Tue, 17 Jan 2023 17:47:20 +0000 (10:47 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 23 Jan 2023 23:11:39 +0000 (18:11 -0500)
This needs to be able to work (at least partially) without the bloblist
active. Add a condition for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
cmd/vbe.c

index befaf07c64d990efb154829a5c9a5fd594b44a9a..600690394eb8e6e71bb543a551e86001ed21fb72 100644 (file)
--- a/cmd/vbe.c
+++ b/cmd/vbe.c
@@ -79,10 +79,13 @@ static int do_vbe_info(struct cmd_tbl *cmdtp, int flag, int argc,
 static int do_vbe_state(struct cmd_tbl *cmdtp, int flag, int argc,
                        char *const argv[])
 {
-       struct vbe_handoff *handoff;
+       struct vbe_handoff *handoff = NULL;
        int i;
 
-       handoff = bloblist_find(BLOBLISTT_VBE, sizeof(struct vbe_handoff));
+       if (IS_ENABLED(CONFIG_BLOBLIST)) {
+               handoff = bloblist_find(BLOBLISTT_VBE,
+                                       sizeof(struct vbe_handoff));
+       }
        if (!handoff) {
                printf("No VBE state\n");
                return CMD_RET_FAILURE;