aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2022-04-25 15:50:49 +0200
committerGerd Hoffmann <kraxel@redhat.com>2022-04-27 07:51:01 +0200
commit2aa6a39bc8ec1b94d926fb5a23483a23ff895a2a (patch)
treee441f5d735681dd9092d7ce861f2d8389f8d3916 /hw
parent0d90da82030c208c525a6757b0babdc481257fd7 (diff)
i386: move bios load error message
Switch to usual goto-end-of-function error handling style. No functional change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Xiaoyao Li <xiaoyao.li@intel.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20220425135051.551037-2-kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/x86.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index bb67272790..ced31f67b9 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -1120,9 +1120,7 @@ void x86_bios_rom_init(MachineState *ms, const char *default_firmware,
}
ret = rom_add_file_fixed(bios_name, (uint32_t)(-bios_size), -1);
if (ret != 0) {
- bios_error:
- fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", bios_name);
- exit(1);
+ goto bios_error;
}
g_free(filename);
@@ -1143,6 +1141,11 @@ void x86_bios_rom_init(MachineState *ms, const char *default_firmware,
memory_region_add_subregion(rom_memory,
(uint32_t)(-bios_size),
bios);
+ return;
+
+bios_error:
+ fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", bios_name);
+ exit(1);
}
bool x86_machine_is_smm_enabled(const X86MachineState *x86ms)