Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Oct 2024 11:21:40 GMT
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 3b5b485d7436 - stable/14 - sound: Remove useless newspd check in sysctl_dev_pcm_vchanrate()
Message-ID:  <202410201121.49KBLe7b062973@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=3b5b485d7436868da687b7e4bd6797c0c44e3528

commit 3b5b485d7436868da687b7e4bd6797c0c44e3528
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-10-18 08:40:33 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-10-20 11:21:05 +0000

    sound: Remove useless newspd check in sysctl_dev_pcm_vchanrate()
    
    feeder_rate_min functions as the lower boundary.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      2 days
    Reviewed by:    dev_submerge.ch, markj, emaste
    Differential Revision:  https://reviews.freebsd.org/D46834
    
    (cherry picked from commit f3092614bcae949332a8f21f7b78ba68b3ee5899)
---
 sys/dev/sound/pcm/vchan.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
index 9046c144b41b..8580eb679f35 100644
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -508,8 +508,7 @@ sysctl_dev_pcm_vchanrate(SYSCTL_HANDLER_ARGS)
 		return (ret);
 	}
 
-	if (newspd < 1 || newspd < feeder_rate_min ||
-	    newspd > feeder_rate_max) {
+	if (newspd < feeder_rate_min || newspd > feeder_rate_max) {
 		PCM_RELEASE_QUICK(d);
 		return (EINVAL);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410201121.49KBLe7b062973>