aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2022-10-12 21:57:53 +0200
committerSimon Glass <sjg@chromium.org>2022-10-17 21:17:12 -0600
commit28a22cd9a482b947b21646ae595e3284cdea3002 (patch)
tree59a2736c2065d68a79cbcc951a67d1729dec7f4b
parent5afe93a18c92a5f08dc6d38c4525e378ffb5067a (diff)
downloadu-boot-28a22cd9a482b947b21646ae595e3284cdea3002.zip
u-boot-28a22cd9a482b947b21646ae595e3284cdea3002.tar.gz
u-boot-28a22cd9a482b947b21646ae595e3284cdea3002.tar.bz2
bootstd: Fix listing boot devices
bootdev_list() uses uclass_*_device_err() to iterate devices. However, the only value _err adds is returning an error when the device pointer is null, and that's checked anyway. Also there is some intent to report errors, and that's what uclass_*_device_check() is for, use it. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--boot/bootdev-uclass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index 13ac69e..9d98bee 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -195,7 +195,7 @@ void bootdev_list(bool probe)
printf("Seq Probed Status Uclass Name\n");
printf("--- ------ ------ -------- ------------------\n");
if (probe)
- ret = uclass_first_device_err(UCLASS_BOOTDEV, &dev);
+ ret = uclass_first_device_check(UCLASS_BOOTDEV, &dev);
else
ret = uclass_find_first_device(UCLASS_BOOTDEV, &dev);
for (i = 0; dev; i++) {
@@ -204,7 +204,7 @@ void bootdev_list(bool probe)
ret ? simple_itoa(ret) : "OK",
dev_get_uclass_name(dev_get_parent(dev)), dev->name);
if (probe)
- ret = uclass_next_device_err(&dev);
+ ret = uclass_next_device_check(&dev);
else
ret = uclass_find_next_device(&dev);
}