aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 140cdbaa29..da76ecd342 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -267,6 +267,8 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
}
return NULL;
found: ;
+ } else if (bus->devices[devfn]) {
+ return NULL;
}
pci_dev->bus = bus;
pci_dev->devfn = devfn;