Commit 4e19aca8 authored by Murad Masimov's avatar Murad Masimov Committed by Greg Kroah-Hartman
Browse files

ALSA: hda/cs8409: Fix possible NULL dereference



[ Upstream commit c9bd4a82 ]

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: 20e50772 ("ALSA: hda/cs8409: Add support for dolphin")
Signed-off-by: default avatarMurad Masimov <m.masimov@maxima.ru>
Link: https://patch.msgid.link/20241010221649.1305-1-m.masimov@maxima.ru


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 208d3ede
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment