Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]>
---
 qemu/hw/device-hotplug.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/qemu/hw/device-hotplug.c b/qemu/hw/device-hotplug.c
index ba1b161..0bcac60 100644
--- a/qemu/hw/device-hotplug.c
+++ b/qemu/hw/device-hotplug.c
@@ -48,6 +48,11 @@ static PCIDevice *qemu_system_hot_assign_device(const char 
*opts, int bus_nr)
     }
  
     ret = init_assigned_device(adev, pci_bus);
+    if (ret == NULL) {
+        term_printf("Failed to assign device\n");
+        free_assigned_device(adev);
+        return NULL;
+    }
 
     term_printf("Registered host PCI device %02x:%02x.%1x "
                "(\"%s\") as guest device %02x:%02x.%1x\n",
-- 
1.5.4.3

--
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

Reply via email to