summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Min Zhao <zyimin@linux.vnet.ibm.com>2016-08-10 13:35:00 +0800
committerCornelia Huck <cornelia.huck@de.ibm.com>2016-09-05 15:15:16 +0200
commit0c2a16a4dc56fbdbe7f619e2a860214dc6f89ec6 (patch)
tree2386b89a47c70a095629cdae8c70af19980bce98
parent0d36d791927753599e9ca36e344f9fb272126e3d (diff)
downloadqemu-0c2a16a4dc56fbdbe7f619e2a860214dc6f89ec6.tar.gz
qemu-0c2a16a4dc56fbdbe7f619e2a860214dc6f89ec6.tar.bz2
qemu-0c2a16a4dc56fbdbe7f619e2a860214dc6f89ec6.zip
s390x/pci: assert zpci always existing
If one pci device is plugged successfully, there must be a zpci device existing. This means that during hot-unplugging a pci device, its corresponding zpci device must be found. Therefore we use an assert to replace current code. Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-rw-r--r--hw/s390x/s390-pci-bus.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 5750f22fc3..ac8f06d9e7 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -718,11 +718,7 @@ static void s390_pcihost_hot_unplug(HotplugHandler *hotplug_dev,
break;
}
}
-
- if (!pbdev) {
- object_unparent(OBJECT(pci_dev));
- return;
- }
+ assert(pbdev != NULL);
} else if (object_dynamic_cast(OBJECT(dev), TYPE_S390_PCI_DEVICE)) {
pbdev = S390_PCI_DEVICE(dev);
pci_dev = pbdev->pdev;