summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-07-30 15:52:20 -0600
committerTom Rini <trini@konsulko.com>2022-08-12 08:14:24 -0400
commita18686cda14cf0281a00fe1cd44c2647d351d4aa (patch)
tree5d438ccc4614968a7128624b32128eabdcc17557 /boot
parent988cacaeedae920c13741c9ab2fc580f63a06c3a (diff)
bootstd: Tidy up var naming in bootdev_setup_iter_order()
Avoid using 'count' to mean either a count or an error, since this is confusing. In fact, the called function never return 0, since that is an error. Use 'ret' instead. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot')
-rw-r--r--boot/bootdev-uclass.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index 1ede933c2f..5683006c73 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -604,14 +604,14 @@ int bootdev_setup_iter_order(struct bootflow_iter *iter, struct udevice **devp)
log_debug("Expected %d bootdevs, found %d using aliases\n",
count, upto);
- count = build_order(bootstd, order, upto);
- if (count < 0) {
+ ret = build_order(bootstd, order, upto);
+ if (ret < 0) {
free(order);
- return log_msg_ret("build", count);
+ return log_msg_ret("build", ret);
}
+ iter->num_devs = ret;
iter->dev_order = order;
- iter->num_devs = count;
iter->cur_dev = 0;
dev = *order;