diff options
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); |