and exit before uslessly trying to load it if the file does not exists. Issue dicovered by Coverity Scan.
Signed-off-by: Cédric Le Goater <c...@kaod.org> --- hw/ppc/pnv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 47221158d415..7728eece2eec 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -570,6 +570,10 @@ static void ppc_powernv_init(MachineState *machine) } fw_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); + if (!fw_filename) { + error_report("Could not find OPAL '%s'", bios_name); + exit(1); + } fw_size = load_image_targphys(fw_filename, FW_LOAD_ADDR, FW_MAX_SIZE); if (fw_size < 0) { -- 2.13.5