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>
This commit is contained in:
Philippe Mathieu-Daudé 2017-06-23 13:45:56 -03:00 committed by Michael Tokarev
parent c8e1158cf6
commit 32fb354b08

View File

@ -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;
}