diff options
author | Yojiro Uo <yuo@cvs.openbsd.org> | 2010-09-24 08:34:00 +0000 |
---|---|---|
committer | Yojiro Uo <yuo@cvs.openbsd.org> | 2010-09-24 08:34:00 +0000 |
commit | 8894920ec143a1381e301f7c2e93c9a430320b33 (patch) | |
tree | 3ca0a7d7780850ca9a2eccfa99b379f31f38d667 /sys/dev/usb/if_cdce.c | |
parent | 2333fd7ebd3c575940690efef14c44e15abef121 (diff) |
remove dying flag in detach() function.
The dying flag will be set in activate()/DEACTIVATE.
ok deraadt@
Diffstat (limited to 'sys/dev/usb/if_cdce.c')
-rw-r--r-- | sys/dev/usb/if_cdce.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c index f6619167dc1..c98c2195460 100644 --- a/sys/dev/usb/if_cdce.c +++ b/sys/dev/usb/if_cdce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cdce.c,v 1.45 2010/03/06 17:09:31 mk Exp $ */ +/* $OpenBSD: if_cdce.c,v 1.46 2010/09/24 08:33:58 yuo Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> @@ -372,12 +372,10 @@ cdce_detach(struct device *self, int flags) struct ifnet *ifp = GET_IFP(sc); int s; - s = splusb(); - - if (!sc->cdce_attached) { - splx(s); + if (!sc->cdce_attached) return (0); - } + + s = splusb(); if (ifp->if_flags & IFF_RUNNING) cdce_stop(sc); |