]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: hda - Don't register a cb func if it is registered already
authorHui Wang <hui.wang@canonical.com>
Wed, 30 Sep 2020 05:51:46 +0000 (13:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:08 +0000 (10:07 +0100)
commit4e3c57b30473b5c0944d1be2414d43d62cd31d38
tree96425d951b9b5c4d37cacbb0b215760520cb6f1a
parent618a54d780a5a00ca21299545d1dcd7c17cf75f1
ALSA: hda - Don't register a cb func if it is registered already

commit f4794c6064a83d2c57b264bd299c367d172d1044 upstream.

If the caller of enable_callback_mst() passes a cb func, the callee
function will malloc memory and link this cb func to the list
unconditionally. This will introduce problem if caller is in the
hda_codec_ops.init() since the init() will be repeatedly called in the
codec rt_resume().

So far, the patch_hdmi.c and patch_ca0132.c call enable_callback_mst()
in the hda_codec_ops.init().

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200930055146.5665-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/hda_jack.c