The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6c735475aeefc626962818c0ab8749aaeb6de9a4
commit 6c735475aeefc626962818c0ab8749aaeb6de9a4 Author: Christos Margiolis <[email protected]> AuthorDate: 2026-09-18 18:18:01 +0000 Commit: Christos Margiolis <[email protected]> CommitDate: 2026-09-18 18:18:01 +0000 sound: Reuse mixer_delete() in mixer_uninit() Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D59077 --- sys/dev/sound/pcm/mixer.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index c0d05b5d195d..19bb28cbb939 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -519,8 +519,6 @@ int mixer_delete(struct snd_mixer *m) { KASSERT(m != NULL, ("NULL snd_mixer")); - KASSERT(m->type == MIXER_TYPE_SECONDARY, - ("%s(): illegal mixer type=%d", __func__, m->type)); /* mixer uninit can sleep --hps */ @@ -633,11 +631,7 @@ mixer_uninit(device_t dev) /* mixer uninit can sleep --hps */ - MIXER_UNINIT(m); - - if (m->type == MIXER_TYPE_SECONDARY) - mtx_destroy(m->lock); - kobj_delete((kobj_t)m, M_DEVBUF); + mixer_delete(m); return 0; }
