aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2005-06-11 00:47:34 +0000
committerBrooks Davis <brooks@FreeBSD.org>2005-06-11 00:47:34 +0000
commit7ba33d8222c24e7b4e556a2f80abe4750abcfb90 (patch)
treea517e669adc8325f260cbad0b20af2f76cda7fb3 /sys/dev
parent5201165c85fd8b6c07403b91750215fbc526182c (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/fxp/if_fxp.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 4fd50f93ac47e..ca4de5ba325f4 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -388,6 +388,13 @@ fxp_attach(device_t dev)
s = splimp();
+ ifp = sc->ifp = if_alloc(IFT_ETHER);
+ if (ifp == NULL) {
+ device_printf(dev, "can not if_alloc()\n");
+ error = ENOSPC;
+ goto fail;
+ }
+
/*
* Enable bus mastering.
*/
@@ -745,12 +752,6 @@ fxp_attach(device_t dev)
}
}
- ifp = sc->ifp = if_alloc(IFT_ETHER);
- if (ifp == NULL) {
- device_printf(dev, "can not if_alloc()\n");
- error = ENOSPC;
- goto fail;
- }
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
ifp->if_baudrate = 100000000;
ifp->if_init = fxp_init;