Skip to content

Commit

Permalink
hw/core: fix missing return value in load_image_targphys_as()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
philmd authored and Michael Tokarev committed Jul 11, 2017
1 parent c8e1158 commit 32fb354
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hw/core/loader.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 32fb354

Please sign in to comment.