q35_host_realize() has an errp parameter. Use that to be able to propagate the error instead of terminating abruptly.
Signed-off-by: Bernhard Beschow <shen...@gmail.com> --- hw/pci-host/q35.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index cf9fb35064..39d70b9f59 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -46,6 +46,7 @@ static void q35_host_realize(DeviceState *dev, Error **errp) { + ERRP_GUARD(); Q35PCIHost *s = Q35_HOST_DEVICE(dev); PCIHostState *phb = PCI_HOST_BRIDGE(dev); SysBusDevice *sbd = SYS_BUS_DEVICE(dev); @@ -74,7 +75,7 @@ static void q35_host_realize(DeviceState *dev, Error **errp) s->mch.address_space_io, 0, TYPE_PCIE_BUS); - qdev_realize(DEVICE(&s->mch), BUS(phb->bus), &error_fatal); + qdev_realize(DEVICE(&s->mch), BUS(phb->bus), errp); } static const char *q35_host_root_bus_path(PCIHostState *host_bridge, -- 2.39.2