mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-03 18:23:34 +00:00
bootstd: Detect empty bootmeth ordering
If the ordering produces no entries, this is an error. Report it, so that the caller doesn't try to continue with a NULL bootmeth. This fixes a crash in the bootflow_iter test when running with the sandbox 'default' device tree, instead of the required 'test' one. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
f1c8cbd944
commit
10d16faa43
1 changed files with 2 additions and 0 deletions
|
@ -114,6 +114,8 @@ int bootmeth_setup_iter_order(struct bootflow_iter *iter)
|
||||||
}
|
}
|
||||||
count = upto;
|
count = upto;
|
||||||
}
|
}
|
||||||
|
if (!count)
|
||||||
|
return log_msg_ret("count2", -ENOENT);
|
||||||
|
|
||||||
iter->method_order = order;
|
iter->method_order = order;
|
||||||
iter->num_methods = count;
|
iter->num_methods = count;
|
||||||
|
|
Loading…
Add table
Reference in a new issue