git: aba2523261c1 - main - sound: Do not check for NULL before deleting ac97_info->methods
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 23 Apr 2026 13:01:19 UTC
The branch main has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=aba2523261c1e541debe674c059c1ac16210fc04
commit aba2523261c1e541debe674c059c1ac16210fc04
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-04-18 10:33:58 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-04-23 12:59:52 +0000
sound: Do not check for NULL before deleting ac97_info->methods
It is allocated with M_WAITOK in ac97_create().
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/17
---
sys/dev/sound/pcm/ac97.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c
index 73a1e0280e56..1407d202a0d1 100644
--- a/sys/dev/sound/pcm/ac97.c
+++ b/sys/dev/sound/pcm/ac97.c
@@ -835,8 +835,7 @@ void
ac97_destroy(struct ac97_info *codec)
{
mtx_lock(&codec->lock);
- if (codec->methods != NULL)
- kobj_delete(codec->methods, M_AC97);
+ kobj_delete(codec->methods, M_AC97);
mtx_destroy(&codec->lock);
free(codec, M_AC97);
}