aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ti/if_ti.c
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2005-03-31 17:16:40 +0000
committerScott Long <scottl@FreeBSD.org>2005-03-31 17:16:40 +0000
commit69bbb4fe7062440c86c4a104b315cfd0da31fa70 (patch)
tree4ac66294954b8d9ed7f81b3058e7c5032d0c4c32 /sys/dev/ti/if_ti.c
parentfe234894e5d04f8843e1a886d085c777644d9f7f (diff)
Notes
Diffstat (limited to 'sys/dev/ti/if_ti.c')
-rw-r--r--sys/dev/ti/if_ti.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index 56e2207e6cdc..86cea7c74750 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -2311,7 +2311,8 @@ ti_detach(dev)
struct ifnet *ifp;
sc = device_get_softc(dev);
- destroy_dev(sc->dev);
+ if (sc->dev)
+ destroy_dev(sc->dev);
KASSERT(mtx_initialized(&sc->ti_mtx), ("ti mutex not initialized"));
TI_LOCK(sc);
ifp = &sc->arpcom.ac_if;