X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=hw%2Fpci%2Fpci.c;h=637d54549e410dc0b6c53d44449ad362d7b3b004;hb=d93ddfb1f8fb72a7c175a8cf1028c639f769d105;hp=24fae1689d507fa6c4ea82bdb33beee47bf8589e;hpb=d9429b84af2302b6e28bec3c52710cf67eda3cee;p=mirror_qemu.git diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 24fae1689d..637d54549e 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -982,8 +982,8 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, pci_get_function_0(pci_dev)) { error_setg(errp, "PCI: slot %d function 0 already ocuppied by %s," " new func %s cannot be exposed to guest.", - PCI_SLOT(devfn), - bus->devices[PCI_DEVFN(PCI_SLOT(devfn), 0)]->name, + PCI_SLOT(pci_get_function_0(pci_dev)->devfn), + pci_get_function_0(pci_dev)->name, name); return NULL;