projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ed6ebd
)
hdt: Check for pci_scan() == NULL.
author
Erwan Velu
<erwan.velu@free.fr>
Mon, 23 Mar 2009 09:05:58 +0000
(10:05 +0100)
committer
Erwan Velu
<erwan.velu@free.fr>
Mon, 23 Mar 2009 09:05:58 +0000
(10:05 +0100)
Impact: we don't have to grab more details if pci_scan returns NULL
Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
com32/hdt/hdt-common.c
patch
|
blob
|
history
diff --git
a/com32/hdt/hdt-common.c
b/com32/hdt/hdt-common.c
index
a2802f8
..
5fd1f36
100644
(file)
--- 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++;