Make sure that pp_name is non-null before setting the device
description. This allows us to rely entirely on the CIS entries if necessary...
This commit is contained in:
parent
423305c9ab
commit
29f491e895
@ -113,7 +113,8 @@ aic_pccard_match(device_t dev)
|
||||
|
||||
if ((pp = pccard_product_lookup(dev, aic_pccard_products,
|
||||
sizeof(aic_pccard_products[0]), NULL)) != NULL) {
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
if (pp->pp_name != NULL)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return 0;
|
||||
}
|
||||
return EIO;
|
||||
|
@ -122,7 +122,8 @@ an_pccard_match(device_t dev)
|
||||
|
||||
if ((pp = pccard_product_lookup(dev, an_pccard_products,
|
||||
sizeof(an_pccard_products[0]), NULL)) != NULL) {
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
if (pp->pp_name != NULL)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return (0);
|
||||
}
|
||||
return (ENXIO);
|
||||
|
@ -85,7 +85,8 @@ awi_pccard_match(device_t dev)
|
||||
|
||||
if ((pp = pccard_product_lookup(dev, awi_pccard_products,
|
||||
sizeof(awi_pccard_products[0]), NULL)) != NULL) {
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
if (pp->pp_name != NULL)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return 0;
|
||||
}
|
||||
return ENXIO;
|
||||
|
@ -58,7 +58,8 @@ cs_pccard_match(device_t dev)
|
||||
|
||||
if ((pp = pccard_product_lookup(dev, cs_pccard_products,
|
||||
sizeof(cs_pccard_products[0]), NULL)) != NULL) {
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
if (pp->pp_name != NULL)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return 0;
|
||||
}
|
||||
return EIO;
|
||||
|
@ -254,7 +254,8 @@ ep_pccard_match(device_t dev)
|
||||
|
||||
if ((pp = pccard_product_lookup(dev, ep_pccard_products,
|
||||
sizeof(ep_pccard_products[0]), NULL)) != NULL) {
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
if (pp->pp_name != NULL)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return 0;
|
||||
}
|
||||
return EIO;
|
||||
|
@ -82,7 +82,8 @@ fe_pccard_match(device_t dev)
|
||||
if ((pp = pccard_product_lookup(dev,
|
||||
(const struct pccard_product *)fe_pccard_products,
|
||||
sizeof(fe_pccard_products[0]), NULL)) != NULL) {
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
if (pp->pp_name != NULL)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return 0;
|
||||
}
|
||||
return EIO;
|
||||
|
@ -210,7 +210,8 @@ static int ncv_pccard_match(device_t dev)
|
||||
if ((pp = (const struct ncv_product *) pccard_product_lookup(dev,
|
||||
(const struct pccard_product *) ncv_products,
|
||||
sizeof(ncv_products[0]), NULL)) != NULL) {
|
||||
device_set_desc(dev, pp->prod.pp_name);
|
||||
if (pp->prod.pp_name != NULL)
|
||||
device_set_desc(dev, pp->prod.pp_name);
|
||||
device_set_flags(dev, pp->flags);
|
||||
return(0);
|
||||
}
|
||||
|
@ -69,7 +69,8 @@ sn_pccard_match(device_t dev)
|
||||
|
||||
if ((pp = pccard_product_lookup(dev, sn_pccard_products,
|
||||
sizeof(sn_pccard_products[0]), NULL)) != NULL) {
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
if (pp->pp_name != NULL)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return 0;
|
||||
}
|
||||
return EIO;
|
||||
|
@ -87,7 +87,8 @@ static int stg_pccard_match(device_t dev)
|
||||
|
||||
if ((pp = pccard_product_lookup(dev, stg_products,
|
||||
sizeof(stg_products[0]), NULL)) != NULL) {
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
if (pp->pp_name != NULL)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return(0);
|
||||
}
|
||||
return(EIO);
|
||||
|
@ -169,7 +169,7 @@ wi_pccard_match(dev)
|
||||
|
||||
if ((pp = pccard_product_lookup(dev, wi_pccard_products,
|
||||
sizeof(wi_pccard_products[0]), NULL)) != NULL) {
|
||||
if (pp->pp_name)
|
||||
if (pp->pp_name != NULL)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return (0);
|
||||
}
|
||||
|
@ -328,7 +328,8 @@ xe_pccard_match(device_t dev)
|
||||
|
||||
if ((pp = pccard_product_lookup(dev, xe_pccard_products,
|
||||
sizeof(xe_pccard_products[0]), NULL)) != NULL) {
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
if (pp->pp_name != NULL)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return (0);
|
||||
}
|
||||
return (EIO);
|
||||
|
Loading…
Reference in New Issue
Block a user