Skip to content
Commit 033e4040 authored by Hui Wang's avatar Hui Wang Committed by Takashi Iwai
Browse files

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: f4794c60 ("ALSA: hda - Don't register a cb func if it is registered already")
Reported-and-suggested-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarHui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20201022030221.22393-1-hui.wang@canonical.com


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7da4c510
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment