diff options
author | Tom Rini <trini@konsulko.com> | 2024-08-22 08:14:48 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-08-22 08:14:48 -0600 |
commit | a481740629af5e51732b86b6ead61dc5aa5a440d (patch) | |
tree | b34a9f7495c4d4614a2ce148ce331f667750989b /boot/image-android.c | |
parent | 0b06e052fb153958d470209dab237f12796cb0da (diff) | |
parent | e49eeb6575152cac4241f3c87471934a726970e9 (diff) |
Merge tag 'u-boot-dfu-20240822' of https://source.denx.de/u-boot/custodians/u-boot-dfu
u-boot-dfu-20240822
- Fix crash in BCB on invalid block device (reported by coverity)
- Fix booting Android kernel without a ramdisk using fastboot
- Fix ux500 gadget driver ops based on CONFIG_USB_MUSB_HOST
Diffstat (limited to 'boot/image-android.c')
-rw-r--r-- | boot/image-android.c | 7 |
1 files changed, 3 insertions, 4 deletions
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, |