diff options
author | Andrew Thompson <thompsa@FreeBSD.org> | 2006-07-04 23:09:11 +0000 |
---|---|---|
committer | Andrew Thompson <thompsa@FreeBSD.org> | 2006-07-04 23:09:11 +0000 |
commit | bac89dcef24cfaf157fa284327811589e7776454 (patch) | |
tree | 02a1cd4d4bdd5e992b0a16f69ae393574225502d /sys/net/if_enc.c | |
parent | 867e6caf17fc4cb2d866682e0bfddfd19a5a9f7f (diff) | |
download | src-bac89dcef24cfaf157fa284327811589e7776454.tar.gz src-bac89dcef24cfaf157fa284327811589e7776454.zip |
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
Notes
Notes:
svn path=/head/; revision=160099
Diffstat (limited to 'sys/net/if_enc.c')
-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 071e4cd4ab09..10c0065da35e 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 |