Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Move the check for successful attachment to earl...
details: https://anonhg.NetBSD.org/src/rev/7ab566a22891
branches: trunk
changeset: 511259:7ab566a22891
user: nathanw <nathanw%NetBSD.org@localhost>
date: Fri Jun 15 18:05:36 2001 +0000
description:
Move the check for successful attachment to earlier in the detach
routine, to avoid referencing nonexistent data structures.
diffstat:
sys/dev/usb/if_aue.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diffs (34 lines):
diff -r 7f147af5a944 -r 7ab566a22891 sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c Fri Jun 15 17:48:13 2001 +0000
+++ b/sys/dev/usb/if_aue.c Fri Jun 15 18:05:36 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aue.c,v 1.57 2001/06/07 10:55:15 enami Exp $ */
+/* $NetBSD: if_aue.c,v 1.58 2001/06/15 18:05:36 nathanw Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul%ee.columbia.edu@localhost>. All rights reserved.
@@ -793,6 +793,11 @@
DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__));
+ if (!sc->aue_attached) {
+ /* Detached before attached finished, so just bail out. */
+ return (0);
+ }
+
usb_uncallout(sc->aue_stat_ch, aue_tick, sc);
/*
* Remove any pending tasks. They cannot be executing because they run
@@ -803,12 +808,6 @@
s = splusb();
- if (!sc->aue_attached) {
- /* Detached before attached finished, so just bail out. */
- splx(s);
- return (0);
- }
-
if (ifp->if_flags & IFF_RUNNING)
aue_stop(sc);
Home |
Main Index |
Thread Index |
Old Index