From: Philippe Mathieu-Daudé Date: Fri, 23 Jun 2017 16:45:56 +0000 (-0300) Subject: hw/core: fix missing return value in load_image_targphys_as() X-Git-Tag: v2.10.0-rc0~79^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32fb354b086eb8981a48c187c17fd937760cd02e;p=thirdparty%2Fqemu.git hw/core: fix missing return value in load_image_targphys_as() Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Signed-off-by: Michael Tokarev --- diff --git a/hw/core/loader.c b/hw/core/loader.c index 3409cc6d1da..c17ace0a2ee 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; }