diff options
| author | Pyun YongHyeon <yongari@FreeBSD.org> | 2010-11-23 19:23:47 +0000 |
|---|---|---|
| committer | Pyun YongHyeon <yongari@FreeBSD.org> | 2010-11-23 19:23:47 +0000 |
| commit | 7093903a73d22692df5518bf37fc35b82b84dc54 (patch) | |
| tree | abc41c3a472ebc3cda53154d4042e26176a1af2d /sys/dev | |
| parent | 2e523ca9f1e66fa36fcf1b93b1576905dc196a2f (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/mii/brgphy.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index 4712e15c934b..438fd4fee4c2 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -153,15 +153,19 @@ static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; + int found; - if (bce_sc->bce_chipid != HS21_BCM_CHIPID) - return (0); - sysenv = getenv("smbios.system.product"); - if (sysenv == NULL) - return (0); - if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) != 0) - return (0); - return (1); + found = 0; + if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { + sysenv = getenv("smbios.system.product"); + if (sysenv != NULL) { + if (strncmp(sysenv, HS21_PRODUCT_ID, + strlen(HS21_PRODUCT_ID)) == 0) + found = 1; + freeenv(sysenv); + } + } + return (found); } /* Search for our PHY in the list of known PHYs */ |
