aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/dc
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2005-09-16 11:11:51 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2005-09-16 11:11:51 +0000
commit3badacee8c62f420e7519685b3700d5741d67ded (patch)
treeeea8401041be885ba31c07333f6e0206b9d04ab0 /sys/dev/dc
parentc4c6f08f6878d257f78ac12816d7f64b211f8f64 (diff)
Notes
Diffstat (limited to 'sys/dev/dc')
-rw-r--r--sys/dev/dc/if_dc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 1dab3748797f..8a9e8c602046 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -2310,7 +2310,6 @@ dc_attach(device_t dev)
if (error) {
device_printf(dev, "couldn't set up irq\n");
ether_ifdetach(ifp);
- if_free(ifp);
goto fail;
}
@@ -2347,8 +2346,9 @@ dc_detach(device_t dev)
DC_UNLOCK(sc);
callout_drain(&sc->dc_stat_ch);
ether_ifdetach(ifp);
- if_free(ifp);
}
+ if (ifp)
+ if_free(ifp);
if (sc->dc_miibus)
device_delete_child(dev, sc->dc_miibus);
bus_generic_detach(dev);