summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-04-09 15:54:00 +0000
committerimp <imp@FreeBSD.org>2003-04-09 15:54:00 +0000
commit04fd973e424b1f7d2d78b8a549c504b025e7a089 (patch)
tree773d979bed680b7684aa60dcf06db03fa28bbbca /sys
parent44c5b8459b18fe23017b645ce085890525e711a2 (diff)
downloadFreeBSD-src-04fd973e424b1f7d2d78b8a549c504b025e7a089.zip
FreeBSD-src-04fd973e424b1f7d2d78b8a549c504b025e7a089.tar.gz
Make sure that both pp_name and pp_vendor are zero to know we're at the
end of the list now that some valid entries don't have pp_name set. Also, don't print a warning if pp->name is NULL and it is a total wildcard.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pccard/pccard.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index e5a862a..dec174c 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -339,16 +339,17 @@ pccard_do_product_lookup(device_t bus, device_t dev,
return (NULL);
if (pccard_get_product_str(dev, &prodstr))
return (NULL);
- for (ent = tab; ent->pp_name != NULL; ent =
+ for (ent = tab; ent->pp_name != NULL && ent->pp_vendor != 0; ent =
(const struct pccard_product *) ((const char *) ent + ent_size)) {
matches = 1;
if (ent->pp_vendor == PCCARD_VENDOR_ANY &&
ent->pp_product == PCCARD_PRODUCT_ANY &&
ent->pp_cis[0] == NULL &&
ent->pp_cis[1] == NULL) {
- device_printf(dev,
- "Total wildcard entry ignored for %s\n",
- ent->pp_name);
+ if (ent->pp_name)
+ device_printf(dev,
+ "Total wildcard entry ignored for %s\n",
+ ent->pp_name);
continue;
}
if (matches && ent->pp_vendor != PCCARD_VENDOR_ANY &&
OpenPOWER on IntegriCloud