]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_hda_read_acpi()
authorDenis Arefev <arefev@swemel.ru>
Tue, 2 Dec 2025 10:13:36 +0000 (13:13 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:42 +0000 (14:03 +0100)
commit343fa9800cf9870ec681e21f0a6f2157b74ae520
treecb910351078231d7b5ddd0b559cef9b782590228
parent3646c928bb77c28bd79f8e1893d32db49230b657
ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_hda_read_acpi()

commit c34b04cc6178f33c08331568c7fd25c5b9a39f66 upstream.

The acpi_get_first_physical_node() function can return NULL, in which
case the get_device() function also returns NULL, but this value is
then dereferenced without checking,so add a check to prevent a crash.

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

Fixes: 7b2f3eb492da ("ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems")
Cc: stable@vger.kernel.org
Signed-off-by: Denis Arefev <arefev@swemel.ru>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251202101338.11437-1-arefev@swemel.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/hda/codecs/side-codecs/cs35l41_hda.c