qdev: Drop misleading qbus_free() function
commit6780a22cc71227068925e7b70faa71d6641a9b1b
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 18 Dec 2013 16:15:51 +0000 (18 17:15 +0100)
committerAndreas Färber <afaerber@suse.de>
Tue, 24 Dec 2013 17:02:18 +0000 (24 18:02 +0100)
treed70f310a7c4e5194b74fc2f0ed31763e5b912d0a
parentf54c19cacb44d2fad14aca6be08e4aa9b8423217
qdev: Drop misleading qbus_free() function

Same reasoning as commit 02a5c4c97422b40034f31265e0f139f7846172a8
("qdev: Drop misleading qdev_free() function").  The qbus_free()
function removes the child from the namespace and decrements the
reference count.  It does not, however, guarantee to free the child
since the refcount may still be held.

Just call object_unparent() directly.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
hw/core/qdev.c
hw/pci/pci_bridge.c
include/hw/qdev-core.h