summary refs log tree commit diff stats
path: root/hw/scsi/spapr_vscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/scsi/spapr_vscsi.c')
-rw-r--r--hw/scsi/spapr_vscsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
index 923488beb2..d17dc03c73 100644
--- a/hw/scsi/spapr_vscsi.c
+++ b/hw/scsi/spapr_vscsi.c
@@ -1225,9 +1225,9 @@ void spapr_vscsi_create(SpaprVioBus *bus)
 {
     DeviceState *dev;
 
-    dev = qdev_create(&bus->bus, "spapr-vscsi");
+    dev = qdev_new("spapr-vscsi");
 
-    qdev_init_nofail(dev);
+    qdev_realize_and_unref(dev, &bus->bus, &error_fatal);
     scsi_bus_legacy_handle_cmdline(&VIO_SPAPR_VSCSI_DEVICE(dev)->bus);
 }