bootstd: Detect empty bootmeth ordering
authorSimon Glass <sjg@chromium.org>
Sat, 30 Jul 2022 21:52:18 +0000 (15:52 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 12 Aug 2022 12:14:24 +0000 (08:14 -0400)
commit10d16faa436c9f06bbcdeb6da35871a1b329b6b0
tree3cb088c84638d685026a97a6efa5a74c35be2bcb
parentf1c8cbd944e097f2d03563316460baf926eeae39
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>
boot/bootmeth-uclass.c