summaryrefslogtreecommitdiff
path: root/boot/image-android.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/image-android.c')
-rw-r--r--boot/image-android.c7
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,