Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Only call audio_initbufs and start playback if there...



details:   https://anonhg.NetBSD.org/src/rev/2173c3d40f69
branches:  trunk
changeset: 821067:2173c3d40f69
user:      nat <nat%NetBSD.org@localhost>
date:      Mon Jan 23 00:21:34 2017 +0000

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

Addresses PR kern/51707.

diffstat:

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

diffs (27 lines):

diff -r 4b9cd31c49fc -r 2173c3d40f69 sys/dev/audio.c
--- a/sys/dev/audio.c   Sun Jan 22 22:26:16 2017 +0000
+++ b/sys/dev/audio.c   Mon Jan 23 00:21:34 2017 +0000
@@ -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 <nathanialsloss%yahoo.com.au@localhost>
@@ -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 @@
        vc->sc_lastinfovalid = true;
 
 cleanup:
-       if (cleared || pausechange|| reset) {
+       if (error == 0 && (cleared || pausechange|| reset)) {
                int init_error;
 
                mutex_enter(sc->sc_intr_lock);



Home | Main Index | Thread Index | Old Index