diff options
author | Markus Armbruster <armbru@redhat.com> | 2009-06-18 15:14:07 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-06-22 10:15:29 -0500 |
commit | 07b7d05377a5e2b242ef0cce3d461d3284700fc0 (patch) | |
tree | 26b40ccb2976bea36390e5c71868669fb8f39a59 | |
parent | 9391e4b8828a6ebcde843a2012f0fae4b601b302 (diff) |
Fix do_pci_register_device() to reject devfn already in use
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | hw/pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |