diff options
| author | Andrew Thompson <thompsa@FreeBSD.org> | 2012-05-08 21:09:03 +0000 |
|---|---|---|
| committer | Andrew Thompson <thompsa@FreeBSD.org> | 2012-05-08 21:09:03 +0000 |
| commit | 335181759e1ca72e0c5103ca8cc2e5ffd6f500eb (patch) | |
| tree | e13bd7576ecc220eb8d3f5ca3722224c2e7ed28b /sys | |
| parent | 9a36eaa36e220f4773ad648cb0ce66137777709b (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/tsec/if_tsec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c index 2e54129e5754..e0a9c7e9a06a 100644 --- a/sys/dev/tsec/if_tsec.c +++ b/sys/dev/tsec/if_tsec.c @@ -289,17 +289,17 @@ int tsec_detach(struct tsec_softc *sc) { + if (sc->tsec_ifp != NULL) { #ifdef DEVICE_POLLING - if (sc->tsec_ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(sc->tsec_ifp); + if (sc->tsec_ifp->if_capenable & IFCAP_POLLING) + ether_poll_deregister(sc->tsec_ifp); #endif - /* Stop TSEC controller and free TX queue */ - if (sc->sc_rres && sc->tsec_ifp) - tsec_shutdown(sc->dev); + /* Stop TSEC controller and free TX queue */ + if (sc->sc_rres) + tsec_shutdown(sc->dev); - /* Detach network interface */ - if (sc->tsec_ifp) { + /* Detach network interface */ ether_ifdetach(sc->tsec_ifp); if_free(sc->tsec_ifp); sc->tsec_ifp = NULL; |
