]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Fix the return value if cb func is already registered
authorHui Wang <hui.wang@canonical.com>
Thu, 22 Oct 2020 03:02:21 +0000 (11:02 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 22 Oct 2020 06:17:02 +0000 (08:17 +0200)
commit58262ca47399a085320940208f5300434dcd9168
tree9e0d2381a85ffae964ee1b506f880702afec6809
parentf85fc65a9817cc1fecbc74759c9912520c6ff96e
ALSA: hda - Fix the return value if cb func is already registered

If the cb function is already registered, should return the pointer
of the structure hda_jack_callback which contains this cb func, but
instead it returns the NULL.

Now fix it by replacing func_is_already_in_callback_list() with
find_callback_from_list().

Fixes: 95e0b08b0cb9 ("ALSA: hda - Don't register a cb func if it is registered already")
Reported-and-suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20201022030221.22393-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_jack.c