diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2016-04-08 12:45:53 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2016-04-08 12:45:53 +0100 |
| commit | 8227e2d16705b8c94df93f465d4e1659c28c69ce (patch) | |
| tree | 6d96c8b445f7eee8ca3c723f65362032bd3bbb10 /hw/pci-bridge/pci_expander_bridge.c | |
| parent | 3be4f4d724852025f2b58d3c4133e1cca576a4de (diff) | |
| parent | 2e4278b534997d8f33a6e8b7923c168f5e5c89c7 (diff) | |
| download | focaccia-qemu-8227e2d16705b8c94df93f465d4e1659c28c69ce.tar.gz focaccia-qemu-8227e2d16705b8c94df93f465d4e1659c28c69ce.zip | |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pci, virtio, acpi: fixes for 2.6 Fixes all over the place. Most notably, fixes migration for systems with pci express bridges, and random crashes observed with virtio blk and scsi dataplane. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Fri 08 Apr 2016 08:53:46 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: hw/pci-bridge: Add missing unref in case register-bus fails virtio: merge virtio_queue_aio_set_host_notifier_handler with virtio_queue_set_aio virtio-scsi: use aio handler for data plane virtio-blk: use aio handler for data plane virtio: add aio handler virtio-scsi: fix disabled mode virtio-blk: fix disabled mode virtio: make virtio_queue_notify_vq static tests/bios-tables-test: fix assert virtio-balloon: reset the statistic timer to load device Migration: Add i82801b11 migration data Sort the fw_cfg file list xen: piix reuse pci generic class init function pci-testdev: fast mmio support acpi: Add missing GCC_FMT_ATTR Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/pci-bridge/pci_expander_bridge.c')
| -rw-r--r-- | hw/pci-bridge/pci_expander_bridge.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c index 5e7e546b99..ba320bd857 100644 --- a/hw/pci-bridge/pci_expander_bridge.c +++ b/hw/pci-bridge/pci_expander_bridge.c @@ -249,7 +249,7 @@ static int pxb_dev_init_common(PCIDevice *dev, bool pcie) PCI_HOST_BRIDGE(ds)->bus = bus; if (pxb_register_bus(dev, bus)) { - return -EINVAL; + goto err_register_bus; } qdev_init_nofail(ds); @@ -263,6 +263,12 @@ static int pxb_dev_init_common(PCIDevice *dev, bool pcie) pxb_dev_list = g_list_insert_sorted(pxb_dev_list, pxb, pxb_compare); return 0; + +err_register_bus: + object_unref(OBJECT(bds)); + object_unparent(OBJECT(bus)); + object_unref(OBJECT(ds)); + return -EINVAL; } static int pxb_dev_initfn(PCIDevice *dev) |