qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/3] hw/core: fix missing return value in load_image


From: Philippe Mathieu-Daudé
Subject: [Qemu-devel] [PATCH 2/3] hw/core: fix missing return value in load_image_targphys_as()
Date: Fri, 23 Jun 2017 13:45:56 -0300

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 hw/core/loader.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/core/loader.c b/hw/core/loader.c
index 094f24627f..e137e772ae 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -150,7 +150,9 @@ int load_image_targphys_as(const char *filename,
         return -1;
     }
     if (size > 0) {
-        rom_add_file_fixed_as(filename, addr, -1, as);
+        if (rom_add_file_fixed_as(filename, addr, -1, as) < 0) {
+            return -1;
+        }
     }
     return size;
 }
-- 
2.13.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]