1. 03 May, 2019 3 commits
    • Ross Zwisler's avatar
      ASoC: Intel: avoid Oops if DMA setup fails · 0efa3334
      Ross Zwisler authored
      Currently in sst_dsp_new() if we get an error return from sst_dma_new()
      we just print an error message and then still complete the function
      successfully.  This means that we are trying to run without sst->dma
      properly set up, which will result in NULL pointer dereference when
      sst->dma is later used.  This was happening for me in
      sst_dsp_dma_get_channel():
      
              struct sst_dma *dma = dsp->dma;
      	...
              dma->ch = dma_request_channel(mask, dma_chan_filter, dsp);
      
      This resulted in:
      
         BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
         IP: sst_dsp_dma_get_channel+0x4f/0x125 [snd_soc_sst_firmware]
      
      Fix this by adding proper error handling for the case where we fail to
      set up DMA.
      
      This change only affects Haswell and Broadwell systems.  Baytrail
      systems explicilty opt-out of DMA via sst->pdata->resindex_dma_base
      being set to -1.
      Signed-off-by: default avatarRoss Zwisler <zwisler@google.com>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      0efa3334
    • Jerome Brunet's avatar
      ASoC: hdmi-codec: stream is already locked in hw_params · 726fc60b
      Jerome Brunet authored
      startup() should have run before hw_params() is called, so the
      current_substream pointer should already be properly set. There
      is no reason to call hdmi_codec_new_stream() again in the
      hw_params() callback
      Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      726fc60b
    • Colin Ian King's avatar
      ASoC: SOF: remove redundant null checks of dai · c437ba03
      Colin Ian King authored
      Currently there are two null checks of pointer dai in function
      sof_connect_dai_widget and yet there is no null check of dai
      at the end of the function when checking !dai->name.  The latter
      would be a null pointer deference if dai is null (as picked up
      by static analysis), however the function is only ever called
      when dai is successfully allocated, so the null checks are
      redundant. Clean up the code by removing the null checks.
      
      Addresses-Coverity: ("Dereference after null check")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      c437ba03
  2. 02 May, 2019 31 commits
  3. 27 Apr, 2019 6 commits