shpc: unparent device before free

Recent core change removed unparent
so we need to do this in all callers now.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Michael S. Tsirkin 2012-06-04 17:29:54 +03:00
parent 8cc9b43f7c
commit e9adf2605d
1 changed files with 1 additions and 0 deletions

View File

@ -253,6 +253,7 @@ static void shpc_free_devices_in_slot(SHPCDevice *shpc, int slot)
++devfn) {
PCIDevice *affected_dev = shpc->sec_bus->devices[devfn];
if (affected_dev) {
object_unparent(OBJECT(affected_dev));
qdev_free(&affected_dev->qdev);
}
}