From: Simon Glass Date: Sun, 1 Sep 2024 22:27:28 +0000 (-0600) Subject: bootstd: Avoid calling unavailable block functions X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=aa0b3e6ef405c01063298cf3c990ae490a673e5e;p=u-boot.git 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 --- diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 807f8dfb06..64ec4fde49 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);