diff mbox

device-assignment: Don't deassign when the assignment fails

Message ID 20100610162015.13106.3162.stgit@localhost.localdomain (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Williamson June 10, 2010, 4:20 p.m. UTC
None
diff mbox

Patch

diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index 2b963b5..7e53a95 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -1407,12 +1407,12 @@  static int assigned_initfn(struct PCIDevice *pci_dev)
     if (pci_enable_capability_support(pci_dev, 0, NULL,
                     assigned_device_pci_cap_write_config,
                     assigned_device_pci_cap_init) < 0)
-        goto assigned_out;
+        goto out;
 
     /* assign device to guest */
     r = assign_device(dev);
     if (r < 0)
-        goto assigned_out;
+        goto out;
 
     /* assign irq for the device */
     r = assign_irq(dev);