Module Name:    src
Committed By:   nat
Date:           Mon Jan 23 00:21:34 UTC 2017

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

Log Message:
Only call audio_initbufs and start playback if there were no errors.

Addresses PR kern/51707.


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 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.295 src/sys/dev/audio.c:1.296
--- src/sys/dev/audio.c:1.295	Sun Jan 22 19:52:02 2017
+++ src/sys/dev/audio.c	Mon Jan 23 00:21:34 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.295 2017/01/22 19:52:02 nat Exp $	*/
+/*	$NetBSD: audio.c,v 1.296 2017/01/23 00:21:34 nat Exp $	*/
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <nathanialsl...@yahoo.com.au>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.295 2017/01/22 19:52:02 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.296 2017/01/23 00:21:34 nat Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -4506,7 +4506,7 @@ audiosetinfo(struct audio_softc *sc, str
 	vc->sc_lastinfovalid = true;
 
 cleanup:
-	if (cleared || pausechange|| reset) {
+	if (error == 0 && (cleared || pausechange|| reset)) {
 		int init_error;
 
 		mutex_enter(sc->sc_intr_lock);

Reply via email to