summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-08-15 00:01:27 +0000
committerOlivier Blin <oblin@mandriva.com>2007-08-15 00:01:27 +0000
commit155547287a03495178fe51ef97dc1d099f34f0bf (patch)
tree726fd406acbf24a8499b76433587bde8fa6859e2 /mdk-stage1
parenta9be8aa3369ab89cef6f3f5263e551a350a5945c (diff)
downloaddrakx-155547287a03495178fe51ef97dc1d099f34f0bf.tar
drakx-155547287a03495178fe51ef97dc1d099f34f0bf.tar.gz
drakx-155547287a03495178fe51ef97dc1d099f34f0bf.tar.bz2
drakx-155547287a03495178fe51ef97dc1d099f34f0bf.tar.xz
drakx-155547287a03495178fe51ef97dc1d099f34f0bf.zip
fix segfault if ldetect does not return a module
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/probing.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c
index 8616d9143..9bd3dbc90 100644
--- a/mdk-stage1/probing.c
+++ b/mdk-stage1/probing.c
@@ -172,6 +172,8 @@ static void add_detected_device(unsigned short vendor, unsigned short device, un
static int add_detected_device_if_match(struct pciusb_entry *e, char **modules, unsigned int modules_len)
{
int i;
+ if (!e->module)
+ return 0;
for (i = 0; i < modules_len; i++) {
if (!strcmp(modules[i], e->module)) {
add_detected_device(e->vendor, e->device, e->subvendor, e->subdevice,
@@ -339,6 +341,8 @@ void probe_that_type(enum driver_type type, enum media_bus bus __attribute__ ((u
for (i = 0; i < entries.nb; i++) {
struct pciusb_entry *e = &entries.entries[i];
int j;
+ if (!e->module)
+ continue;
for (j = 0; j < pci_modules_len; j++) {
if (!strcmp(pci_modules[j], e->module)) {
log_message("PCI: device %04x %04x %04x %04x is \"%s\", driver is %s",