qdev: device free fixups.
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 25 Sep 2009 19:42:34 +0000 (21:42 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 5 Oct 2009 14:32:48 +0000 (09:32 -0500)
commit20a0ea888120aaaaf3f19d29edc6def51de27008
tree4521969fd791e1c1e1822426de656ea4ecb2b391
parent9cd4dbd49ed9db59d037d776f371037dc10961ce
qdev: device free fixups.

Two bug fixes:
 * When freeing a device we unregister even stuff we didn't register in
   the first place because the ->init() callback failed.
 * When freeing a device with child busses attached, we fail to zap the
   child bus (and the devices attached to it).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/qdev.c
hw/qdev.h