qemu-trivial
[Top][All Lists]
Advanced

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

[Qemu-trivial] [PULL 08/13] hw/core: fix missing return value in load_im


From: Michael Tokarev
Subject: [Qemu-trivial] [PULL 08/13] hw/core: fix missing return value in load_image_targphys_as()
Date: Wed, 12 Jul 2017 16:38:04 +0300

From: Philippe Mathieu-Daudé <address@hidden>

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Signed-off-by: Michael Tokarev <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 3409cc6d1d..c17ace0a2e 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.11.0




reply via email to

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