[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
- [Qemu-devel] [PATCH 0/3] hw/core: minor fixups, Philippe Mathieu-Daudé, 2017/06/23
- [Qemu-devel] [PATCH 1/3] elf-loader: warn about invalid endianess, Philippe Mathieu-Daudé, 2017/06/23
- [Qemu-devel] [PATCH 2/3] hw/core: fix missing return value in load_image_targphys_as(),
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH 3/3] hw/core: report an error if invalid gpio is used, Philippe Mathieu-Daudé, 2017/06/23
- Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups, Laszlo Ersek, 2017/06/23
- Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups, Alistair Francis, 2017/06/26
- Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups, Eduardo Habkost, 2017/06/26