Skip to content

Commit

Permalink
bus: do not unref the added child bus on realize
Browse files Browse the repository at this point in the history
When the parent bus removes the child property, it takes care of
removing the added reference, in object_finalize_child_property().

Signed-off-by: Marc-André Lureau <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
  • Loading branch information
elmarco authored and kraxel committed Jun 12, 2018
1 parent 62713a2 commit f3d5838
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion hw/core/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ static void qbus_realize(BusState *bus, DeviceState *parent, const char *name)
QLIST_INSERT_HEAD(&bus->parent->child_bus, bus, sibling);
bus->parent->num_child_bus++;
object_property_add_child(OBJECT(bus->parent), bus->name, OBJECT(bus), NULL);
object_unref(OBJECT(bus));
} else if (bus != sysbus_get_default()) {
/* TODO: once all bus devices are qdevified,
only reset handler for main_system_bus should be registered here. */
Expand Down

0 comments on commit f3d5838

Please sign in to comment.