From b01352fc3c416ab66cfb910d9fd1e6a28ea98235 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Tue, 3 Feb 2009 13:58:19 +0200 Subject: [PATCH] Don't unregister unassigned PCI BAR Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- hw/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci.c b/hw/pci.c index 04aecc2d08..a6d57e5548 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -213,7 +213,7 @@ static void pci_unregister_io_regions(PCIDevice *pci_dev) for(i = 0; i < PCI_NUM_REGIONS; i++) { r = &pci_dev->io_regions[i]; - if (!r->size) + if (!r->size || r->addr == -1) continue; if (r->type == PCI_ADDRESS_SPACE_IO) { isa_unassign_ioport(r->addr, r->size); -- 2.11.4.GIT