diff options
| author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2026-04-28 14:05:31 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-04-29 07:50:16 +0200 |
| commit | 90df4957a3271adf391b3432cd76a40887cf3273 (patch) | |
| tree | 42c40128fa8691e66a5d6d0be4f84265297ff85d /include/linux/input.h | |
| parent | b0e2333a231107adedd38c6fcfe1adc6162716fc (diff) | |
ALSA: hda: cs35l56: Fix uninitialized value in cs35l56_hda_read_acpi()
Eliminate the uninitialized 'nval' in cs35l56_hda_read_acpi() if a
system-specific quirk overrides processing of the dev-index property.
The value is now stored in a new 'num_amps' member of struct cs35l56_hda
so that the quirk handler can set the value.
The quirk for the Lenovo Yoga Book 9i GenX replaces the values from the
dev-index property with hardcoded indexes. So cs35l56_hda_read_acpi() would
then skip reading the property. But this left the 'nval' local variable
uninitialized when it is later passed to cirrus_scodec_get_speaker_id().
Fixes: 40b1c2f9b299 ("ALSA: hda/cs35l56: Workaround bad dev-index on Lenovo Yoga Book 9i GenX")
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/linux-sound/aenFesLAStjrVNy8@stanley.mountain/T/#u
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260428130531.169600-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux/input.h')
0 files changed, 0 insertions, 0 deletions
