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