]> xenbits.xensource.com Git - xenclient/ioemu.git/commitdiff
fix error recovery in pass-through.c
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 9 Feb 2009 10:34:50 +0000 (10:34 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 9 Feb 2009 10:34:50 +0000 (10:34 +0000)
return NULL when error. fix error recovery path.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
hw/pass-through.c

index 29714c7ee094c44bac34f3d61015aa045b3056ea..c2a6ec1024a2e0a6db2779801f562a29238555db 100644 (file)
@@ -3736,8 +3736,10 @@ struct pt_dev * register_real_device(PCIBus *e_bus,
         free_pci_slot = __insert_to_pci_slot(r_bus, r_dev, r_func, 0, NULL);
         if ( free_pci_slot > 0 )
             e_devfn = free_pci_slot  << 3;
-        else
+        else {
             PT_LOG("Error: no free virtual PCI hot plug slot, thus no live migration.\n");
+            return NULL;
+        }
     }
 
     msi_translate = direct_pci_msitranslate;