]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Fix incorrect clearance of thinkpad_acpi hooks
authorTakashi Iwai <tiwai@suse.de>
Mon, 5 Nov 2018 11:28:07 +0000 (12:28 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 6 Nov 2018 15:33:53 +0000 (16:33 +0100)
commitf624bba5baf4f7fca2cfd7c6623b1338fa2e2e77
tree971bed0083a5fc4ed187da0b6db48c4dc2526046
parent07450303e924eaadd4a1132748d0a8d478f7508b
ALSA: hda - Fix incorrect clearance of thinkpad_acpi hooks

Since the commit fd3d8aff7252 ("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: fd3d8aff7252 ("ALSA: hda - Allow multiple ADCs for mic mute LED controls")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/thinkpad_helper.c