git: cabf76fde836 - main - sound: Remove redundant check in mixer_clone()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Mar 2025 21:15:52 UTC
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);
}