aboutsummaryrefslogtreecommitdiff
path: root/hw/core/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core/bus.c')
-rw-r--r--hw/core/bus.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/hw/core/bus.c b/hw/core/bus.c
index 4a57ae107e..a9e4118d3c 100644
--- a/hw/core/bus.c
+++ b/hw/core/bus.c
@@ -176,11 +176,10 @@ static void bus_set_realized(Object *obj, bool value, Error **errp)
BusState *bus = BUS(obj);
BusClass *bc = BUS_GET_CLASS(bus);
BusChild *kid;
- Error *local_err = NULL;
if (value && !bus->realized) {
if (bc->realize) {
- bc->realize(bus, &local_err);
+ bc->realize(bus, errp);
}
/* TODO: recursive realization */
@@ -188,21 +187,13 @@ static void bus_set_realized(Object *obj, bool value, Error **errp)
QTAILQ_FOREACH(kid, &bus->children, sibling) {
DeviceState *dev = kid->child;
object_property_set_bool(OBJECT(dev), false, "realized",
- &local_err);
- if (local_err != NULL) {
- break;
- }
+ &error_abort);
}
- if (bc->unrealize && local_err == NULL) {
- bc->unrealize(bus, &local_err);
+ if (bc->unrealize) {
+ bc->unrealize(bus);
}
}
- if (local_err != NULL) {
- error_propagate(errp, local_err);
- return;
- }
-
bus->realized = value;
}