]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: hda/cs8409: Fix possible NULL dereference
authorMurad Masimov <m.masimov@maxima.ru>
Thu, 10 Oct 2024 22:16:45 +0000 (01:16 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 00:52:32 +0000 (01:52 +0100)
commit4e19aca8db696b6ba4dd8c73657405e15c695f14
treeaabf56abb0555b19b2b1980c8b6dd8a41338eaf7
parent208d3edea1106b21dc022eeee058973ebaf364db
ALSA: hda/cs8409: Fix possible NULL dereference

[ Upstream commit c9bd4a82b4ed32c6d1c90500a52063e6e341517f ]

If snd_hda_gen_add_kctl fails to allocate memory and returns NULL, then
NULL pointer dereference will occur in the next line.

Since dolphin_fixups function is a hda_fixup function which is not supposed
to return any errors, add simple check before dereference, ignore the fail.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 20e507724113 ("ALSA: hda/cs8409: Add support for dolphin")
Signed-off-by: Murad Masimov <m.masimov@maxima.ru>
Link: https://patch.msgid.link/20241010221649.1305-1-m.masimov@maxima.ru
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/hda/patch_cs8409.c