diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2005-06-11 01:37:46 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2005-06-11 01:37:46 +0000 |
| commit | cd036ec1936a2f54579f0c92c7144867beebf615 (patch) | |
| tree | 8113efbab82d5bec5e92fdd42f08d37b6e0b221d /sys/dev/re | |
| parent | 9aa0eba464bf36b61a8bdcbde8085794cf1c74b8 (diff) | |
Notes
Diffstat (limited to 'sys/dev/re')
| -rw-r--r-- | sys/dev/re/if_re.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index fc84ea9c175a1..9cc21aa626706 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1178,6 +1178,13 @@ re_attach(dev) if (error) goto fail; + ifp = sc->rl_ifp = if_alloc(IFT_ETHER); + if (ifp == NULL) { + printf("re%d: can not if_alloc()\n", sc->rl_unit); + error = ENOSPC; + goto fail; + } + /* Do MII setup */ if (mii_phy_probe(dev, &sc->rl_miibus, re_ifmedia_upd, re_ifmedia_sts)) { @@ -1186,12 +1193,6 @@ re_attach(dev) goto fail; } - ifp = sc->rl_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - printf("re%d: can not if_alloc()\n", sc->rl_unit); - error = ENOSPC; - goto fail; - } ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_mtu = ETHERMTU; |
