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>
diff --git a/boot/bootmeth-uclass.c b/boot/bootmeth-uclass.c
index c040d5f..b8ba4ec 100644
--- a/boot/bootmeth-uclass.c
+++ b/boot/bootmeth-uclass.c
@@ -114,6 +114,8 @@
 		}
 		count = upto;
 	}
+	if (!count)
+		return log_msg_ret("count2", -ENOENT);
 
 	iter->method_order = order;
 	iter->num_methods = count;