sound: Remove KASSERT from vchan_setnew()

This check is not really useful, and can in fact break things, if
sysctl_dev_pcm_vchans() calls vchan_setnew() with a value that will not
satisfy the KASSERT condition.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, emaste
Differential Revision:	https://reviews.freebsd.org/D46545

(cherry picked from commit 998de46c51)
This commit is contained in:
Christos Margiolis 2024-10-18 10:38:31 +02:00
parent 2a16654933
commit e1eaa312d5

View file

@ -945,9 +945,6 @@ vchan_setnew(struct snddev_info *d, int direction, int newcnt)
return (EINVAL);
if (newcnt > vcnt) {
KASSERT((newcnt - 1) == vcnt,
("bogus vchan_create() request newcnt=%d vcnt=%d",
newcnt, vcnt));
/* add new vchans - find a parent channel first */
ch = NULL;
CHN_FOREACH(c, d, channels.pcm) {