mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 04:00:52 +07:00
ALSA: hda - Fix incorrect clearance of thinkpad_acpi hooks
Since the commitc647f806b8
("ALSA: hda - Allow multiple ADCs for mic mute LED controls") we allow enabling the mic mute LED with multiple ADCs. The commit changed the function return value to be zero or a negative error, while this change was overlooked in the thinkpad_acpi helper code where it still expects a positive return value for success. This eventually leads to a NULL dereference on a system that has only a mic mute LED. This patch corrects the return value check in the corresponding code as well. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201621 Fixes:c647f806b8
("ALSA: hda - Allow multiple ADCs for mic mute LED controls") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
fc09ab7a76
commit
5e93a125f5
@ -58,8 +58,8 @@ static void hda_fixup_thinkpad_acpi(struct hda_codec *codec,
|
||||
removefunc = false;
|
||||
}
|
||||
if (led_set_func(TPACPI_LED_MICMUTE, false) >= 0 &&
|
||||
snd_hda_gen_add_micmute_led(codec,
|
||||
update_tpacpi_micmute) > 0)
|
||||
!snd_hda_gen_add_micmute_led(codec,
|
||||
update_tpacpi_micmute))
|
||||
removefunc = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user