Impact: prevent from grabbing configuration when PCI is PCI_CFG_NONE
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
cfgtype = pci_set_config_type(PCI_CFG_AUTO);
dprintf("PCI configuration type %d\n", cfgtype);
+
+ if (cfgtype == PCI_CFG_NONE)
+ return NULL;
+
dprintf("Scanning PCI Buses\n");
for (nbus = 0; nbus < MAX_PCI_BUSES; nbus++) {
unsigned int nbus, ndev, nfunc, maxfunc;
pciaddr_t a;
int cfgtype;
+
cfgtype = pci_set_config_type(PCI_CFG_AUTO);
+ if (cfgtype == PCI_CFG_NONE)
+ return;
for (nbus = 0; nbus < MAX_PCI_BUSES; nbus++) {
bus = NULL;