Module Name:    src
Committed By:   pgoyette
Date:           Thu Dec 15 22:01:57 UTC 2016

Modified Files:
        src/sys/dev: audio.c

Log Message:
In the n == VAUDIOCHANS case we need to call mutex_exit() before
returning.

Perhaps this will address PR kern/51721


To generate a diff of this commit:
cvs rdiff -u -r1.278 -r1.279 src/sys/dev/audio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/audio.c
diff -u src/sys/dev/audio.c:1.278 src/sys/dev/audio.c:1.279
--- src/sys/dev/audio.c:1.278	Tue Dec 13 17:12:51 2016
+++ src/sys/dev/audio.c	Thu Dec 15 22:01:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.278 2016/12/13 17:12:51 christos Exp $	*/
+/*	$NetBSD: audio.c,v 1.279 2016/12/15 22:01:57 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <[email protected]>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.278 2016/12/13 17:12:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.279 2016/12/15 22:01:57 pgoyette Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -5001,8 +5001,10 @@ audio_suspend(device_t dv, const pmf_qua
 		if (sc->sc_audiopid[n].pid == curproc->p_pid)
 			break;
 	}
-	if (n == VAUDIOCHANS)
+	if (n == VAUDIOCHANS) {
+		mutex_exit(sc->sc_lock);
 		return false;
+	}
 
 	audio_mixer_capture(sc);
 	mutex_enter(sc->sc_intr_lock);

Reply via email to