hw/pci-host/raven: Propagate error in raven_realize()
When an Error** reference is available, it is better to propagate local errors, rather then using generic ones, which might terminate the whole QEMU process. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Gavin Shan <gshan@redhat.com> Message-Id: <20231120213301.24349-26-philmd@linaro.org>
This commit is contained in:
parent
ca1b876292
commit
cb50fc6842
@ -345,8 +345,10 @@ static void raven_realize(PCIDevice *d, Error **errp)
|
||||
d->config[PCI_LATENCY_TIMER] = 0x10;
|
||||
d->config[PCI_CAPABILITY_LIST] = 0x00;
|
||||
|
||||
memory_region_init_rom_nomigrate(&s->bios, OBJECT(s), "bios", BIOS_SIZE,
|
||||
&error_fatal);
|
||||
if (!memory_region_init_rom_nomigrate(&s->bios, OBJECT(s), "bios",
|
||||
BIOS_SIZE, errp)) {
|
||||
return;
|
||||
}
|
||||
memory_region_add_subregion(get_system_memory(), (uint32_t)(-BIOS_SIZE),
|
||||
&s->bios);
|
||||
if (s->bios_name) {
|
||||
|
Loading…
Reference in New Issue
Block a user