Skip to content
Commit 6386682c authored by Simon Trimmer's avatar Simon Trimmer Committed by Takashi Iwai
Browse files

ALSA: hda: cs35l41: Possible null pointer dereference in cs35l41_hda_unbind()



The cs35l41_hda_unbind() function clears the hda_component entry
matching it's index and then dereferences the codec pointer held in the
first element of the hda_component array, this is an issue when the
device index was 0.

Instead use the codec pointer stashed in the cs35l41_hda structure as it
will still be valid.

Fixes: 7cf5ce66 ("ALSA: hda: cs35l41: Add device_link between HDA and cs35l41_hda")
Signed-off-by: default avatarSimon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240531120820.35367-1-simont@opensource.cirrus.com


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d339131b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment