diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-03-23 10:05:58 +0100 |
---|---|---|
committer | Erwan Velu <erwan.velu@free.fr> | 2009-03-26 18:26:19 +0100 |
commit | f2d07ce8e43953ec1eeca162cdac1d86c6e978c9 (patch) | |
tree | 98cc976ff02cdbb2c31482e82c57db11ed84d380 | |
parent | 0b521deabada69008a3c0ccb5ebd45f5abe693a0 (diff) | |
download | syslinux.git-f2d07ce8e43953ec1eeca162cdac1d86c6e978c9.tar.gz syslinux.git-f2d07ce8e43953ec1eeca162cdac1d86c6e978c9.tar.xz syslinux.git-f2d07ce8e43953ec1eeca162cdac1d86c6e978c9.zip |
hdt: Check for pci_scan() == NULL.
Impact: we don't have to grab more details if pci_scan returns NULL
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
-rw-r--r-- | com32/hdt/hdt-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/com32/hdt/hdt-common.c b/com32/hdt/hdt-common.c index a2802f82..5fd1f36e 100644 --- a/com32/hdt/hdt-common.c +++ b/com32/hdt/hdt-common.c @@ -326,13 +326,17 @@ void detect_pci(struct s_hardware *hardware) return; hardware->pci_detection = true; + hardware->nb_pci_devices = 0; + /* Scanning to detect pci buses and devices */ hardware->pci_domain = pci_scan(); + if (!hardware->pci_domain) + return; + /* Gathering addtional information*/ gather_additional_pci_config(hardware->pci_domain); - hardware->nb_pci_devices = 0; struct pci_device *pci_device; for_each_pci_func(pci_device, hardware->pci_domain) { hardware->nb_pci_devices++; |