Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2025 21:15:52 GMT
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: cabf76fde836 - main - sound: Remove redundant check in mixer_clone()
Message-ID:  <202503122115.52CLFqoM027176@gitrepo.freebsd.org>

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

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

commit cabf76fde8368222a68865953521e1c3668b5298
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-03-12 21:15:34 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-03-12 21:15:34 +0000

    sound: Remove redundant check in mixer_clone()
    
    PCM_REGISTERED() does this check through PCM_ALIVE().
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/dev/sound/pcm/mixer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index b5b5814e667b..7bd0a2e14c46 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -1365,7 +1365,7 @@ mixer_clone(void *arg,
 		bus_topo_lock();
 		d = devclass_get_softc(pcm_devclass, snd_unit);
 		/* See related comment in dsp_clone(). */
-		if (d != NULL && PCM_REGISTERED(d) && d->mixer_dev != NULL) {
+		if (PCM_REGISTERED(d) && d->mixer_dev != NULL) {
 			*dev = d->mixer_dev;
 			dev_ref(*dev);
 		}



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