summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoneri Le Bouder <goneri@rulezlan.org>2008-04-01 20:19:40 +0200
committerAdam Jackson <ajax@redhat.com>2008-04-07 10:30:26 -0400
commit8059b57f9ba85663ee3ef8dccb46ed915368965d (patch)
tree31ca0aa128f93528e5a02199af26ff5e90f5f006
parent841aa08ea435e1f1bf11d2f56c6df1e66c2de020 (diff)
xfree86: don't crash in AutoConfig if the primary device is not pci
Only call matchDriverFromFiles() if we found a pci device. Debian bug#472823 (http://bugs.debian.org/472823). (cherry picked from commit 9500033b9ecdfaf5a56a4355ffc94d74cb17ca17)
-rw-r--r--hw/xfree86/common/xf86AutoConfig.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index 268b50cb5..3210e4460 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -436,9 +436,10 @@ chooseVideoDriver(void)
if (!info) {
ErrorF("Primary device is not PCI\n");
}
-
#ifdef __linux__
- matchDriverFromFiles(matches, info->vendor_id, info->device_id);
+ else {
+ matchDriverFromFiles(matches, info->vendor_id, info->device_id);
+ }
#endif /* __linux__ */
/* TODO Handle multiple drivers claiming to support the same PCI ID */