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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user