From: Ian Jackson Date: Mon, 9 Feb 2009 10:34:50 +0000 (+0000) Subject: fix error recovery in pass-through.c X-Git-Tag: t.master-before-merge~16 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7a01a1bf65c9eaf4e091194bcf51fb1be693c0b4;p=qemu-xen-3.4-testing.git fix error recovery in pass-through.c return NULL when error. fix error recovery path. Signed-off-by: Isaku Yamahata --- diff --git a/hw/pass-through.c b/hw/pass-through.c index 29714c7e..c2a6ec10 100644 --- a/hw/pass-through.c +++ b/hw/pass-through.c @@ -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;