diff options
author | thompsa <thompsa@FreeBSD.org> | 2006-07-04 23:09:11 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2006-07-04 23:09:11 +0000 |
commit | 74d9a3f64d1b15459f1b52c6d4feb839de4a9989 (patch) | |
tree | 02a1cd4d4bdd5e992b0a16f69ae393574225502d /sys/net | |
parent | 9926c77bc7b5089b98c7d142b1065082b5fffdf1 (diff) | |
download | FreeBSD-src-74d9a3f64d1b15459f1b52c6d4feb839de4a9989.zip FreeBSD-src-74d9a3f64d1b15459f1b52c6d4feb839de4a9989.tar.gz |
Fix a braino in the last revision, enc_clone_destroy needs return void instead
of int. The clone system will ensure that our first interface is not destroyed
so we dont need the extra checking anyway.
Tested by: Scott Ullrich
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_enc.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c index 071e4cd..10c0065 100644 --- a/sys/net/if_enc.c +++ b/sys/net/if_enc.c @@ -86,27 +86,18 @@ static int enc_ioctl(struct ifnet *, u_long, caddr_t); static int enc_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct rtentry *rt); static int enc_clone_create(struct if_clone *, int); -static int enc_clone_destroy(struct ifnet *); +static void enc_clone_destroy(struct ifnet *); IFC_SIMPLE_DECLARE(enc, 1); -static int +static void enc_clone_destroy(struct ifnet *ifp) { - - mtx_lock(&enc_mtx); - /* do not allow enc0 to be destroyed */ - if (encif == ifp) { - mtx_unlock(&enc_mtx); - return (EBUSY); - } - mtx_unlock(&enc_mtx); + KASSERT(ifp != encif, ("%s: destroying encif", __func__)); bpfdetach(ifp); if_detach(ifp); if_free(ifp); - - return (0); } static int |