summary refs log tree commit diff stats
path: root/hw/core/qdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core/qdev.c')
-rw-r--r--hw/core/qdev.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index ae3b006f39..68948761f2 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -388,8 +388,6 @@ void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev,
  */
 bool qdev_realize(DeviceState *dev, BusState *bus, Error **errp)
 {
-    Error *err = NULL;
-
     assert(!dev->realized && !dev->parent_bus);
 
     if (bus) {
@@ -398,10 +396,7 @@ bool qdev_realize(DeviceState *dev, BusState *bus, Error **errp)
         assert(!DEVICE_GET_CLASS(dev)->bus_type);
     }
 
-    if (!object_property_set_bool(OBJECT(dev), "realized", true, &err)) {
-        error_propagate(errp, err);
-    }
-    return !err;
+    return object_property_set_bool(OBJECT(dev), "realized", true, errp);
 }
 
 /*