]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: hdmi-codec: Fix module unloading caused kernel crash
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Tue, 20 Feb 2018 14:19:05 +0000 (16:19 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 20 Feb 2018 14:24:38 +0000 (14:24 +0000)
commit26d5502ae79dd5f99587a5357e6cc4eb25723523
tree8d40ed2e94e5cf5ff52c3633200133b34ae2f2a8
parentbcac507057f6668c45308343ba41f4c91a086136
ASoC: hdmi-codec: Fix module unloading caused kernel crash

The hcp->chmap_info must not be freed up in the hdmi_codec_remove()
function as it leads to kernel crash due ALSA core's
pcm_chmap_ctl_private_free() is trying to free it up again when the card
destroyed via snd_card_free.

Commit ab30a39bbaadf ("ASoC: hdmi-codec: add channel mapping control")
should not have added the kfree(hcp->chmap_info); to the hdmi_codec_remove
function.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Jyri Sarha <jsarha@ti.com>
Tested-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/hdmi-codec.c