git: e1eaa312d592 - stable/14 - sound: Remove KASSERT from vchan_setnew()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 20 Oct 2024 11:21:28 UTC
The branch stable/14 has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=e1eaa312d592a8cde8c9faf49e026a4d3f47489c
commit e1eaa312d592a8cde8c9faf49e026a4d3f47489c
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-10-18 08:38:31 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-10-20 11:21:04 +0000
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 998de46c51452b046ecd9ba8ed592dd7c4f79f51)
---
sys/dev/sound/pcm/vchan.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
index fa4fa2023b71..c1ad9b9ec2ba 100644
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -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) {