diff options
author | Simon Glass <sjg@chromium.org> | 2024-09-01 16:27:28 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2024-10-17 12:45:10 -0600 |
commit | 489296f8077db2b39fc251fbb61bb593462094ca (patch) | |
tree | 9ea22f1487bddcb8bb2fc06c8af965a9f8a9146d /boot | |
parent | edf4b1e135fe5ddf28982326de33b75585cead16 (diff) | |
download | u-boot-489296f8077db2b39fc251fbb61bb593462094ca.tar.gz |
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>
Diffstat (limited to 'boot')
-rw-r--r-- | boot/bootdev-uclass.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 807f8dfb064..64ec4fde493 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -434,6 +434,9 @@ int bootdev_find_by_label(const char *label, struct udevice **devp, struct uclass *uc; enum uclass_id id; + if (!CONFIG_IS_ENABLED(BLK)) + return -ENOSYS; + ret = label_to_uclass(label, &seq, &method_flags); if (ret < 0) return log_msg_ret("uc", ret); |