bootstd: Avoid calling unavailable block functions

When BLK is not enabled but BOOTSTD is, some features of standard boot
become unavailable. Add a check for this in the only site that is
currently apparent.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2024-09-01 16:27:28 -06:00
parent 8c3e44d307
commit aa0b3e6ef4

View File

@ -434,6 +434,9 @@ int bootdev_find_by_label(const char *label, struct udevice **devp,
struct uclass *uc; struct uclass *uc;
enum uclass_id id; enum uclass_id id;
if (!CONFIG_IS_ENABLED(BLK))
return -ENOSYS;
ret = label_to_uclass(label, &seq, &method_flags); ret = label_to_uclass(label, &seq, &method_flags);
if (ret < 0) if (ret < 0)
return log_msg_ret("uc", ret); return log_msg_ret("uc", ret);