Source-Changes-HG archive

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

[src/jmcneill-audiomp3]: src/sys/dev/ic XXX: don't KASSERT() if sc->lock is N...



details:   https://anonhg.NetBSD.org/src/rev/7e000305319b
branches:  jmcneill-audiomp3
changeset: 771329:7e000305319b
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Nov 20 08:39:59 2011 +0000

description:
XXX: don't KASSERT() if sc->lock is NULL, this is going to happen
XXX: during autoconfig match() where we've faked up a sc anyway.

diffstat:

 sys/dev/ic/opl.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r afab6eac6112 -r 7e000305319b sys/dev/ic/opl.c
--- a/sys/dev/ic/opl.c  Sun Nov 20 05:35:20 2011 +0000
+++ b/sys/dev/ic/opl.c  Sun Nov 20 08:39:59 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: opl.c,v 1.37.14.1 2011/11/19 21:49:37 jmcneill Exp $   */
+/*     $NetBSD: opl.c,v 1.37.14.2 2011/11/20 08:39:59 mrg Exp $        */
 
 /*
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.37.14.1 2011/11/19 21:49:37 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.37.14.2 2011/11/20 08:39:59 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -206,7 +206,7 @@
        DPRINTFN(4, ("opl_command: sc=%p, offs=%d addr=0x%02x data=0x%02x\n",
                     sc, offs, addr, data));
 
-       KASSERT(mutex_owned(sc->lock));
+       KASSERT(!sc->lock || mutex_owned(sc->lock));
 
        offs += sc->offs;
        bus_space_write_1(sc->iot, sc->ioh, OPL_ADDR+offs, addr);



Home | Main Index | Thread Index | Old Index