Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Forgot not to decrement sc_opens on unsuccessful open.



details:   https://anonhg.NetBSD.org/src/rev/7ac52d7a1f95
branches:  trunk
changeset: 820783:7ac52d7a1f95
user:      nat <nat%NetBSD.org@localhost>
date:      Sun Jan 15 00:04:01 2017 +0000

description:
Forgot not to decrement sc_opens on unsuccessful open.

diffstat:

 sys/dev/audio.c |  9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diffs (30 lines):

diff -r 4ecc497576b2 -r 7ac52d7a1f95 sys/dev/audio.c
--- a/sys/dev/audio.c   Sat Jan 14 22:58:04 2017 +0000
+++ b/sys/dev/audio.c   Sun Jan 15 00:04:01 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.290 2017/01/14 20:05:37 nat Exp $  */
+/*     $NetBSD: audio.c,v 1.291 2017/01/15 00:04:01 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.290 2017/01/14 20:05:37 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.291 2017/01/15 00:04:01 nat Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -2027,11 +2027,6 @@
        vc->sc_nrfilters = 0;
        if (hw->close != NULL && sc->sc_opens == 0)
                hw->close(sc->hw_hdl);
-       if (flags & FREAD)
-               sc->sc_recopens--;
-       sc->sc_opens--;
-       sc->sc_audiopid[n].pid = -1;
-       sc->sc_despid[n].pid = -1;
        mutex_exit(sc->sc_lock);
        audio_free_ring(sc, &vc->sc_mpr);
        audio_free_ring(sc, &vc->sc_mrr);



Home | Main Index | Thread Index | Old Index