Revision 09e3acc6 hw/pci.c
b/hw/pci.c | ||
---|---|---|
580 | 580 |
if (!bus->devices[devfn]) |
581 | 581 |
goto found; |
582 | 582 |
} |
583 |
hw_error("PCI: no devfn available for %s, all in use\n", name); |
|
583 |
qemu_error("PCI: no devfn available for %s, all in use\n", name); |
|
584 |
return NULL; |
|
584 | 585 |
found: ; |
585 | 586 |
} else if (bus->devices[devfn]) { |
586 |
hw_error("PCI: devfn %d not available for %s, in use by %s\n", devfn,
|
|
587 |
qemu_error("PCI: devfn %d not available for %s, in use by %s\n", devfn,
|
|
587 | 588 |
name, bus->devices[devfn]->name); |
589 |
return NULL; |
|
588 | 590 |
} |
589 | 591 |
pci_dev->bus = bus; |
590 | 592 |
pci_dev->devfn = devfn; |
... | ... | |
625 | 627 |
pci_dev = do_pci_register_device(pci_dev, bus, name, devfn, |
626 | 628 |
config_read, config_write, |
627 | 629 |
PCI_HEADER_TYPE_NORMAL); |
630 |
if (pci_dev == NULL) { |
|
631 |
hw_error("PCI: can't register device\n"); |
|
632 |
} |
|
628 | 633 |
return pci_dev; |
629 | 634 |
} |
630 | 635 |
static target_phys_addr_t pci_to_cpu_addr(target_phys_addr_t addr) |
... | ... | |
1376 | 1381 |
pci_dev = do_pci_register_device(pci_dev, bus, base->name, devfn, |
1377 | 1382 |
info->config_read, info->config_write, |
1378 | 1383 |
info->header_type); |
1384 |
if (pci_dev == NULL) |
|
1385 |
return -1; |
|
1379 | 1386 |
rc = info->init(pci_dev); |
1380 | 1387 |
if (rc != 0) |
1381 | 1388 |
return rc; |
Also available in: Unified diff