]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer
authorSu Hui <suhui@nfschina.com>
Thu, 15 Jun 2023 02:17:32 +0000 (10:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:37:15 +0000 (08:37 +0200)
commit5f13d67027fa782096e6aee0db5dce61c4aeb613
tree8460075a59c39cba87236c17e07e1c2d95b7f82a
parent801c8341f7aff07c494b53e627970b72635af5d3
ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer

[ Upstream commit 79597c8bf64ca99eab385115743131d260339da5 ]

smatch error:
sound/pci/ac97/ac97_codec.c:2354 snd_ac97_mixer() error:
we previously assumed 'rac97' could be null (see line 2072)

remove redundant assignment, return error if rac97 is NULL.

Fixes: da3cec35dd3c ("ALSA: Kill snd_assert() in sound/pci/*")
Signed-off-by: Su Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20230615021732.1972194-1-suhui@nfschina.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/ac97/ac97_codec.c