[PATCH 10/71] vbe: Avoid a build failure when bloblist is not enabled

Simon Glass sjg at chromium.org
Wed Dec 7 09:50:36 CET 2022


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 at chromium.org>
---

 cmd/vbe.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/cmd/vbe.c b/cmd/vbe.c
index befaf07c64d..600690394eb 100644
--- 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;
-- 
2.39.0.rc0.267.gcb52ba06e7-goog



More information about the U-Boot mailing list