summaryrefslogtreecommitdiff
path: root/boot/bootflow.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-07-31 00:52:23 +0300
committerTom Rini <trini@konsulko.com>2022-08-12 15:17:11 +0300
commiteccb25cd5922edebc15f135923aa2b4bbd26527d (patch)
tree4ffd44ff0c951a104d180a3239b06984efa3a486 /boot/bootflow.c
parent2662b54d70fc04f070f0e4a9742d4b3197c9f3ea (diff)
downloadu-boot-eccb25cd5922edebc15f135923aa2b4bbd26527d.tar.xz
bootstd: Allow the bootdev to be optional in bootflows
With global bootmeths we want to scan without a bootdev. Update the logic to allow this. Change the bootflow command to show the bootdev only when valid. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/bootflow.c')
-rw-r--r--boot/bootflow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/boot/bootflow.c b/boot/bootflow.c
index 24ba3c3466..37bccb823a 100644
--- a/boot/bootflow.c
+++ b/boot/bootflow.c
@@ -307,7 +307,8 @@ void bootflow_free(struct bootflow *bflow)
void bootflow_remove(struct bootflow *bflow)
{
- list_del(&bflow->bm_node);
+ if (bflow->dev)
+ list_del(&bflow->bm_node);
list_del(&bflow->glob_node);
bootflow_free(bflow);