• Peter Ujfalusi's avatar
    ASoC: hdmi-codec: Fix module unloading caused kernel crash · f1c680f5
    Peter Ujfalusi authored
    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.
    
    Since the driver was converted to devm_snd_soc_register_component() the
    whole platform_device.remove can be removed.
    
    Commit cd6111b2 ("ASoC: hdmi-codec: add channel mapping control")
    should not have added the kfree(hcp->chmap_info); to the hdmi_codec_remove
    function.
    
    [Separate verison of the fix for -next -- broonie]
    Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    f1c680f5
hdmi-codec.c 23.9 KB