aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-03-23 10:05:58 +0100
committerErwan Velu <erwan.velu@free.fr>2009-03-23 10:05:58 +0100
commita06ecb70edf1416701c405513f13f3505a999482 (patch)
tree8d0ca89bdddebb428d5431a92b305b96647e7183 /com32/hdt
parent4ed6ebda51d4de5cda5fb90334affad8eba66764 (diff)
downloadsyslinux.git-a06ecb70edf1416701c405513f13f3505a999482.tar.gz
syslinux.git-a06ecb70edf1416701c405513f13f3505a999482.tar.xz
syslinux.git-a06ecb70edf1416701c405513f13f3505a999482.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)
Diffstat (limited to 'com32/hdt')
-rw-r--r--com32/hdt/hdt-common.c6
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++;