Page MenuHomeFreeBSD

D44998.diff
No OneTemporary

D44998.diff

diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -297,7 +297,7 @@
int pcm_chnalloc(struct snddev_info *d, struct pcm_channel **ch, int direction,
pid_t pid, char *comm);
-int pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch);
+void pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch);
int pcm_chn_remove(struct snddev_info *d, struct pcm_channel *ch);
int pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo);
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -379,7 +379,7 @@
sysctl_hw_snd_maxautovchans, "I",
"maximum virtual channel");
-int
+void
pcm_chn_add(struct snddev_info *d, struct pcm_channel *ch)
{
PCM_BUSYASSERT(d);
@@ -405,8 +405,6 @@
default:
__assert_unreachable();
}
-
- return (0);
}
int
@@ -454,7 +452,6 @@
{
struct snddev_info *d = device_get_softc(dev);
struct pcm_channel *ch;
- int err;
PCM_BUSYASSERT(d);
@@ -467,15 +464,10 @@
return (ENODEV);
}
- err = pcm_chn_add(d, ch);
+ pcm_chn_add(d, ch);
PCM_UNLOCK(d);
- if (err) {
- device_printf(d->dev, "pcm_chn_add(%s) failed, err=%d\n",
- ch->name, err);
- chn_kill(ch);
- }
- return (err);
+ return (0);
}
static void
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -706,13 +706,8 @@
}
/* add us to our grandparent's channel list */
- ret = pcm_chn_add(d, ch);
+ pcm_chn_add(d, ch);
PCM_UNLOCK(d);
- if (ret != 0) {
- chn_kill(ch);
- CHN_LOCK(parent);
- return (ret);
- }
CHN_LOCK(parent);
/*
@@ -727,6 +722,7 @@
parent->flags |= CHN_F_HAS_VCHAN;
+ ret = 0;
parent_caps = chn_getcaps(parent);
if (parent_caps == NULL)
ret = EINVAL;

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 27, 12:37 PM (4 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16170460
Default Alt Text
D44998.diff (1 KB)

Event Timeline