diff options
Diffstat (limited to 'boot')
-rw-r--r-- | boot/bootdev-uclass.c | 23 | ||||
-rw-r--r-- | boot/image-android.c | 7 | ||||
-rw-r--r-- | boot/image-board.c | 4 | ||||
-rw-r--r-- | boot/scene.c | 8 |
4 files changed, 14 insertions, 28 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 7c7bba088c9..807f8dfb064 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -632,7 +632,7 @@ int bootdev_next_label(struct bootflow_iter *iter, struct udevice **devp, int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp) { - struct udevice *dev = *devp, *last_dev = NULL; + struct udevice *dev = *devp; bool found; int ret; @@ -640,6 +640,7 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp) *devp = NULL; log_debug("next prio %d: dev=%p/%s\n", iter->cur_prio, dev, dev ? dev->name : "none"); + found = false; do { /* * Don't probe devices here since they may not be of the @@ -682,23 +683,13 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp) } } else { ret = device_probe(dev); - if (!ret) - last_dev = dev; - if (ret) { - log_warning("Device '%s' failed to probe\n", + if (ret) + log_debug("Device '%s' failed to probe\n", dev->name); - if (last_dev == dev) { - /* - * We have already tried this device - * and it failed to probe. Give up. - */ - return log_msg_ret("probe", ret); - } - last_dev = dev; - dev = NULL; - } + else + found = true; } - } while (!dev); + } while (!found); *devp = dev; diff --git a/boot/image-android.c b/boot/image-android.c index 09c7a44e058..774565fd1fe 100644 --- a/boot/image-android.c +++ b/boot/image-android.c @@ -393,10 +393,9 @@ int android_image_get_ramdisk(const void *hdr, const void *vendor_boot_img, if (!android_image_get_data(hdr, vendor_boot_img, &img_data)) return -EINVAL; - if (!img_data.ramdisk_size) { - *rd_data = *rd_len = 0; - return -1; - } + if (!img_data.ramdisk_size) + return -ENOENT; + if (img_data.header_version > 2) { ramdisk_ptr = img_data.ramdisk_addr; memcpy((void *)(ramdisk_ptr), (void *)img_data.vendor_ramdisk_ptr, diff --git a/boot/image-board.c b/boot/image-board.c index 99ee7968baf..1757e5816d8 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -427,7 +427,9 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a unmap_sysmem(ptr); } - if (ret) + if (ret == -ENOENT) + return -ENOPKG; + else if (ret) return ret; done = true; } diff --git a/boot/scene.c b/boot/scene.c index ac976aa26bb..270c9c67233 100644 --- a/boot/scene.c +++ b/boot/scene.c @@ -79,13 +79,7 @@ int scene_title_set(struct scene *scn, uint id) int scene_obj_count(struct scene *scn) { - struct scene_obj *obj; - int count = 0; - - list_for_each_entry(obj, &scn->obj_head, sibling) - count++; - - return count; + return list_count_nodes(&scn->obj_head); } void *scene_obj_find(const struct scene *scn, uint id, enum scene_obj_t type) |