diff options
Diffstat (limited to 'hw/xen')
-rw-r--r-- | hw/xen/xen-bus.c | 4 | ||||
-rw-r--r-- | hw/xen/xen-legacy-backend.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c index 32dd4461be..532f73661b 100644 --- a/hw/xen/xen-bus.c +++ b/hw/xen/xen-bus.c @@ -1387,9 +1387,9 @@ type_init(xen_register_types) void xen_bus_init(void) { - DeviceState *dev = qdev_create(NULL, TYPE_XEN_BRIDGE); + DeviceState *dev = qdev_new(TYPE_XEN_BRIDGE); BusState *bus = qbus_create(TYPE_XEN_BUS, dev, NULL); - qdev_init_nofail(dev); + qdev_realize_and_unref(dev, NULL, &error_fatal); qbus_set_bus_hotplug_handler(bus, &error_abort); } diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c index f9d013811a..1c25373852 100644 --- a/hw/xen/xen-legacy-backend.c +++ b/hw/xen/xen-legacy-backend.c @@ -703,8 +703,8 @@ int xen_be_init(void) xengnttab_close(gnttabdev); } - xen_sysdev = qdev_create(NULL, TYPE_XENSYSDEV); - qdev_init_nofail(xen_sysdev); + xen_sysdev = qdev_new(TYPE_XENSYSDEV); + qdev_realize_and_unref(xen_sysdev, NULL, &error_fatal); xen_sysbus = qbus_create(TYPE_XENSYSBUS, xen_sysdev, "xen-sysbus"); qbus_set_bus_hotplug_handler(xen_sysbus, &error_abort); |