]> git.ipfire.org Git - thirdparty/kernel/linux.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)
commit033e4040d453f1f7111e5957a54f3019eb089cc6
tree9e0d2381a85ffae964ee1b506f880702afec6809
parent7da4c510abff8ad47eb2d7cc9a97def5a411947f
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: f4794c6064a8 ("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