From 92159568b42d8e1fea5ab9bd5a033cc8468a511f Mon Sep 17 00:00:00 2001 From: delphij Date: Tue, 14 Jun 2005 14:50:40 +0000 Subject: Initialize sc->an_ifp when doing if_alloc(). This prevents an(4) from being panic when attaching. Approved by: re (scottl) --- sys/dev/an/if_an.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/an') diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c index 0aae094..1722471 100644 --- a/sys/dev/an/if_an.c +++ b/sys/dev/an/if_an.c @@ -676,7 +676,7 @@ an_attach(sc, unit, flags) mtx_init(&sc->an_mtx, device_get_nameunit(sc->an_dev), MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE); - ifp = if_alloc(IFT_ETHER); + ifp = sc->an_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { printf("an%d: can not if_alloc()\n", sc->an_unit); goto fail; -- cgit v1.1