diff options
author | Warner Losh <imp@FreeBSD.org> | 2003-04-10 04:36:02 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2003-04-10 04:36:02 +0000 |
commit | f5746231ff7652f580d3f8f8ecec3f5fe47f1bdb (patch) | |
tree | b753190964ccbd5954520469be2512025019f370 /sys | |
parent | 2701fed4cf6398e814d04b0ff1f06d04c840e7f1 (diff) | |
download | src-f5746231ff7652f580d3f8f8ecec3f5fe47f1bdb.tar.gz src-f5746231ff7652f580d3f8f8ecec3f5fe47f1bdb.zip |
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...
Notes
Notes:
svn path=/head/; revision=113315
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/aic/aic_pccard.c | 3 | ||||
-rw-r--r-- | sys/dev/an/if_an_pccard.c | 3 | ||||
-rw-r--r-- | sys/dev/awi/if_awi_pccard.c | 3 | ||||
-rw-r--r-- | sys/dev/cs/if_cs_pccard.c | 3 | ||||
-rw-r--r-- | sys/dev/ep/if_ep_pccard.c | 3 | ||||
-rw-r--r-- | sys/dev/fe/if_fe_pccard.c | 3 | ||||
-rw-r--r-- | sys/dev/ncv/ncr53c500_pccard.c | 3 | ||||
-rw-r--r-- | sys/dev/sn/if_sn_pccard.c | 3 | ||||
-rw-r--r-- | sys/dev/stg/tmc18c30_pccard.c | 3 | ||||
-rw-r--r-- | sys/dev/wi/if_wi_pccard.c | 2 | ||||
-rw-r--r-- | sys/dev/xe/if_xe_pccard.c | 3 |
11 files changed, 21 insertions, 11 deletions
diff --git a/sys/dev/aic/aic_pccard.c b/sys/dev/aic/aic_pccard.c index d60519059b4c..b0a594ae416f 100644 --- a/sys/dev/aic/aic_pccard.c +++ b/sys/dev/aic/aic_pccard.c @@ -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; diff --git a/sys/dev/an/if_an_pccard.c b/sys/dev/an/if_an_pccard.c index d8c63918661c..9768eb811be0 100644 --- a/sys/dev/an/if_an_pccard.c +++ b/sys/dev/an/if_an_pccard.c @@ -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); diff --git a/sys/dev/awi/if_awi_pccard.c b/sys/dev/awi/if_awi_pccard.c index d9c3b5917c10..4e6150d99073 100644 --- a/sys/dev/awi/if_awi_pccard.c +++ b/sys/dev/awi/if_awi_pccard.c @@ -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; diff --git a/sys/dev/cs/if_cs_pccard.c b/sys/dev/cs/if_cs_pccard.c index a927f21f9c34..9ec044b38d5e 100644 --- a/sys/dev/cs/if_cs_pccard.c +++ b/sys/dev/cs/if_cs_pccard.c @@ -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; diff --git a/sys/dev/ep/if_ep_pccard.c b/sys/dev/ep/if_ep_pccard.c index ca30515a24ad..5a3e70a9bf1d 100644 --- a/sys/dev/ep/if_ep_pccard.c +++ b/sys/dev/ep/if_ep_pccard.c @@ -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; diff --git a/sys/dev/fe/if_fe_pccard.c b/sys/dev/fe/if_fe_pccard.c index f4f1adaff1f8..693b28e8f9e8 100644 --- a/sys/dev/fe/if_fe_pccard.c +++ b/sys/dev/fe/if_fe_pccard.c @@ -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; diff --git a/sys/dev/ncv/ncr53c500_pccard.c b/sys/dev/ncv/ncr53c500_pccard.c index 16eea9ff7d6a..cfa4402ca33b 100644 --- a/sys/dev/ncv/ncr53c500_pccard.c +++ b/sys/dev/ncv/ncr53c500_pccard.c @@ -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); } diff --git a/sys/dev/sn/if_sn_pccard.c b/sys/dev/sn/if_sn_pccard.c index 038dbc35109f..88812bdc44ea 100644 --- a/sys/dev/sn/if_sn_pccard.c +++ b/sys/dev/sn/if_sn_pccard.c @@ -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; diff --git a/sys/dev/stg/tmc18c30_pccard.c b/sys/dev/stg/tmc18c30_pccard.c index b99fdd28dc2a..4a12139e7777 100644 --- a/sys/dev/stg/tmc18c30_pccard.c +++ b/sys/dev/stg/tmc18c30_pccard.c @@ -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); diff --git a/sys/dev/wi/if_wi_pccard.c b/sys/dev/wi/if_wi_pccard.c index ff57a3dbd3d5..3cb085e7f7ca 100644 --- a/sys/dev/wi/if_wi_pccard.c +++ b/sys/dev/wi/if_wi_pccard.c @@ -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); } diff --git a/sys/dev/xe/if_xe_pccard.c b/sys/dev/xe/if_xe_pccard.c index 83a0a8f0e1f7..fcebdc2a1f0a 100644 --- a/sys/dev/xe/if_xe_pccard.c +++ b/sys/dev/xe/if_xe_pccard.c @@ -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); |