summaryrefslogtreecommitdiffstats
path: root/hw/core/loader.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2017-06-23 18:45:56 +0200
committerMichael Tokarev2017-07-11 10:18:37 +0200
commit32fb354b086eb8981a48c187c17fd937760cd02e (patch)
treed543141dd79b5e631dc5ee7815581356f2f576f0 /hw/core/loader.c
parentelf-loader: warn about invalid endianness (diff)
downloadqemu-32fb354b086eb8981a48c187c17fd937760cd02e.tar.gz
qemu-32fb354b086eb8981a48c187c17fd937760cd02e.tar.xz
qemu-32fb354b086eb8981a48c187c17fd937760cd02e.zip
hw/core: fix missing return value in load_image_targphys_as()
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/core/loader.c')
-rw-r--r--hw/core/loader.c4
1 files changed, 3 insertions, 1 deletions
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;
}