diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-04 18:13:00 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-01-08 21:03:43 +0100 |
commit | 5d5b24d042072fb4d13e7027f6e52e44390a9896 (patch) | |
tree | b7bf9690cbf8f55a88f2a78e12d176248a8b6c50 /cmd.h | |
parent | 507066f8a9610c0088df19ce7b3e436f43165ec1 (diff) | |
download | qemu-5d5b24d042072fb4d13e7027f6e52e44390a9896.zip qemu-5d5b24d042072fb4d13e7027f6e52e44390a9896.tar.gz qemu-5d5b24d042072fb4d13e7027f6e52e44390a9896.tar.bz2 |
qdev: Don't assume existence of parent bus on unparenting
Commit 667d22d1ae59da46b4c1fbd094ca61145f19b8c3 (qdev: move bus removal
to object_unparent) made the assumption that at unparenting time
parent_bus is not NULL. This assumption is unjustified since
object_unparent() may well be called directly after object_initialize(),
without any qdev_set_parent_bus().
This did not cause any issues yet because qdev_[try_]create() does call
qdev_set_parent_bus(), falling back to SysBus if unsupplied.
While at it, ensure that this new function uses the device_ prefix and
make the name more neutral in light of this semantic change.
Reported-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Diffstat (limited to 'cmd.h')
0 files changed, 0 insertions, 0 deletions