summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pcm/vchan.c
diff options
context:
space:
mode:
authormatk <matk@FreeBSD.org>2004-01-20 03:58:57 +0000
committermatk <matk@FreeBSD.org>2004-01-20 03:58:57 +0000
commitebfd4faca3b4486d6e438fc39dacd968ecf9a8cc (patch)
treeeb0f190890fc8154dc34ccf943d093f9426e4057 /sys/dev/sound/pcm/vchan.c
parent1bf3c3e6434fdf234bfa5471a146508c48e6f7f4 (diff)
downloadFreeBSD-src-ebfd4faca3b4486d6e438fc39dacd968ecf9a8cc.zip
FreeBSD-src-ebfd4faca3b4486d6e438fc39dacd968ecf9a8cc.tar.gz
Fix a panic when kldloading a sound driver. Do this by replacing the
link-list of dev_t's with named variables. Remove used code. Approved by: tanimura (mentor)
Diffstat (limited to 'sys/dev/sound/pcm/vchan.c')
-rw-r--r--sys/dev/sound/pcm/vchan.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
index 4a70a82..0c5867b 100644
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -260,7 +260,10 @@ vchan_create(struct pcm_channel *parent)
CHN_UNLOCK(parent);
/* add us to our grandparent's channel list */
- err = pcm_chn_add(d, child, !first);
+ /*
+ * XXX maybe we shouldn't always add the dev_t
+ */
+ err = pcm_chn_add(d, child);
if (err) {
pcm_chn_destroy(child);
free(pce, M_DEVBUF);
@@ -313,7 +316,7 @@ gotch:
parent->flags &= ~CHN_F_BUSY;
/* remove us from our grandparent's channel list */
- err = pcm_chn_remove(d, c, !last);
+ err = pcm_chn_remove(d, c);
if (err)
return err;
OpenPOWER on IntegriCloud