Impact: we don't have to grab more details if pci_scan returns NULL
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
/* Scanning to detect pci buses and devices */
printf("PCI: Scanning PCI BUS\n");
pci_domain = pci_scan();
+ if (!pci_domain) {
+ printf("PCI: no devices found!\n");
+ return 1;
+ }
struct pci_device *pci_device;
for_each_pci_func(pci_device, pci_domain) {
/* display the pci devices we found */
display_pci_devices(pci_domain);
- return 1;
+ return 0;
}