mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
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.
This commit is contained in:
parent
22baecf2bd
commit
7e9b53e399
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113300
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user