summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2003-01-14 17:13:52 +0000
committercognet <cognet@FreeBSD.org>2003-01-14 17:13:52 +0000
commit84edc3c4f0a5e8192222b82621761b165a8a0f5a (patch)
tree44863be9dcce40a431638c6581f75a05a47e348f /sys/dev/sound
parent606954dc42800829bdf9d016403e40f85acb3c66 (diff)
downloadFreeBSD-src-84edc3c4f0a5e8192222b82621761b165a8a0f5a.zip
FreeBSD-src-84edc3c4f0a5e8192222b82621761b165a8a0f5a.tar.gz
Don't call destroy_dev it a channel has children.
vchan creation doesn't lead to /dev entry creation if the new vchan is the first child of a channel, This fix a panic that happens when loading a sound driver module, creating vchans and unloading the driver. Approved by: cg MFC after: 3 days
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/pcm/sound.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index 2b77684..c184a69 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -536,7 +536,7 @@ pcm_killchan(device_t dev)
snd_mtxunlock(d->lock);
ch = sce->channel;
- error = pcm_chn_remove(d, sce->channel, 1);
+ error = pcm_chn_remove(d, sce->channel, SLIST_EMPTY(&ch->children));
if (error)
return (error);
return (pcm_chn_destroy(ch));
OpenPOWER on IntegriCloud