Han, Weidong wrote:
-int pci_unregister_device(PCIDevice *pci_dev)+int pci_unregister_device(PCIDevice *pci_dev, int assigned) { int ret = 0;@@ -377,7 +377,11 @@ int pci_unregister_device(PCIDevice *pci_dev)qemu_free_irqs(pci_dev->irq); pci_irq_index--; pci_dev->bus->devices[pci_dev->devfn] = NULL; - qdev_free(&pci_dev->qdev); + + if (assigned) + qemu_free(pci_dev); + else + qdev_free(&pci_dev->qdev); return 0; }
Can you check pci_dev->qdev instead of assigned? A little less ugly. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
