aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrian Feldman <green@FreeBSD.org>2003-02-11 16:58:54 +0000
committerBrian Feldman <green@FreeBSD.org>2003-02-11 16:58:54 +0000
commitd00d7d5c39df46759346c0cf3ed0562b2a23f1b3 (patch)
tree55a82cc988f97642d21ea51120f837501fb7a17f /sys
parente937a222a6b1a4fdf4213a0896a0fc6935f4a289 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/pcm/dsp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index dd69dcfc11e4..f2d463c53e2f 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -274,8 +274,11 @@ dsp_open(dev_t i_dev, int flags, int mode, struct thread *td)
if (chn_reset(rdch, fmt)) {
pcm_lock(d);
pcm_chnrelease(rdch);
- if (wrch && (flags & FWRITE))
+ i_dev->si_drv1 = NULL;
+ if (wrch && (flags & FWRITE)) {
pcm_chnrelease(wrch);
+ i_dev->si_drv2 = NULL;
+ }
pcm_unlock(d);
splx(s);
return ENODEV;
@@ -289,10 +292,12 @@ dsp_open(dev_t i_dev, int flags, int mode, struct thread *td)
if (chn_reset(wrch, fmt)) {
pcm_lock(d);
pcm_chnrelease(wrch);
+ i_dev->si_drv2 = NULL;
if (flags & FREAD) {
CHN_LOCK(rdch);
pcm_chnref(rdch, -1);
pcm_chnrelease(rdch);
+ i_dev->si_drv1 = NULL;
}
pcm_unlock(d);
splx(s);