OSDN Git Service
(root)
/
android-x86
/
external-libpciaccess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ba6b02
)
Don't try to use bogus bridge data
author
Jesse Barnes
<jbarnes@virtuousgeek.org>
Tue, 30 Jun 2009 22:24:45 +0000
(15:24 -0700)
committer
Jesse Barnes
<jbarnes@virtuousgeek.org>
Tue, 30 Jun 2009 22:24:45 +0000
(15:24 -0700)
If, for whatever reason, we weren't able to read bridge data (therefore
leaving bridge.pci or bridge.pcmcia empty), we shouldn't try to look at
the bus data inside the pci/pcmcia struct.
src/common_bridge.c
patch
|
blob
|
history
diff --git
a/src/common_bridge.c
b/src/common_bridge.c
index
2480ba8
..
7f26bdc
100644
(file)
--- a/
src/common_bridge.c
+++ b/
src/common_bridge.c
@@
-270,6
+270,10
@@
pci_device_get_bridge_buses(struct pci_device * dev, int *primary_bus,
return ENODEV;
}
+ if (!priv->bridge.pci) {
+ return ENODEV;
+ }
+
switch ((dev->device_class >> 8) & 0x0ff) {
case 0x00:
/* What to do for host bridges? I'm pretty sure this isn't right.