Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Move an assert to the point where the referenced ...



details:   https://anonhg.NetBSD.org/src/rev/7d41464b3bcb
branches:  trunk
changeset: 790371:7d41464b3bcb
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Oct 04 21:10:18 2013 +0000

description:
Move an assert to the point where the referenced variable is initialized.

diffstat:

 sys/dev/ic/sl811hs.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r eb3519ab5958 -r 7d41464b3bcb sys/dev/ic/sl811hs.c
--- a/sys/dev/ic/sl811hs.c      Fri Oct 04 21:07:37 2013 +0000
+++ b/sys/dev/ic/sl811hs.c      Fri Oct 04 21:10:18 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sl811hs.c,v 1.45 2013/10/03 13:19:24 skrll Exp $       */
+/*     $NetBSD: sl811hs.c,v 1.46 2013/10/04 21:10:18 joerg Exp $       */
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.45 2013/10/03 13:19:24 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.46 2013/10/04 21:10:18 joerg Exp $");
 
 #include "opt_slhci.h"
 
@@ -1340,8 +1340,6 @@
        struct slhci_softc *sc;
        struct slhci_pipe *spipe;
 
-       KASSERT(mutex_owned(&sc->sc_lock));
-
        spipe = (struct slhci_pipe *)xfer->pipe;
 
        if (spipe == NULL)
@@ -1349,6 +1347,8 @@
 
        sc = spipe->pipe.device->bus->hci_private;
 
+       KASSERT(mutex_owned(&sc->sc_lock));
+
        DLOG(D_TRACE, "%s abort xfer %p spipe %p spipe->xfer %p",
            pnames(spipe->ptype), xfer, spipe, spipe->xfer);
 



Home | Main Index | Thread Index | Old Index