aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv/virt.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/riscv/virt.c')
-rw-r--r--hw/riscv/virt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index d569b38d1b..fa88e9118c 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -443,9 +443,9 @@ static inline DeviceState *gpex_pcie_init(MemoryRegion *sys_mem,
qemu_irq irq;
int i;
- dev = qdev_create(NULL, TYPE_GPEX_HOST);
+ dev = qdev_new(TYPE_GPEX_HOST);
- qdev_init_nofail(dev);
+ qdev_realize_and_unref(dev, NULL, &error_fatal);
ecam_alias = g_new0(MemoryRegion, 1);
ecam_reg = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0);