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
This commit is contained in:
Christos Margiolis
2026-04-18 12:33:58 +02:00
parent fb83835275
commit aba2523261
+1 -2
View File
@@ -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);
}