lkml.org 
[lkml]   [2015]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.1 082/267] ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card
    Date
    4.1-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Peter Ujfalusi <peter.ujfalusi@ti.com>

    commit 80ba2669ec8c3e6517aa935001f6cb8809bf3df4 upstream.

    If the card is not part of any card the tas_data->codec is NULL since it is
    set only during snd_soc_codec_driver.probe, which is not yet called.

    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    sound/soc/codecs/tas2552.c | 3 +++
    1 file changed, 3 insertions(+)

    --- a/sound/soc/codecs/tas2552.c
    +++ b/sound/soc/codecs/tas2552.c
    @@ -120,6 +120,9 @@ static void tas2552_sw_shutdown(struct t
    {
    u8 cfg1_reg;

    + if (!tas_data->codec)
    + return;
    +
    if (sw_shutdown)
    cfg1_reg = 0;
    else



    \
     
     \ /
      Last update: 2015-08-01 00:01    [W:4.339 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site