1. 03 5月, 2019 3 次提交
    • R
      ASoC: Intel: avoid Oops if DMA setup fails · 0efa3334
      Ross Zwisler 提交于
      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: NRoss Zwisler <zwisler@google.com>
      Cc: stable@vger.kernel.org
      Acked-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      0efa3334
    • J
      ASoC: hdmi-codec: stream is already locked in hw_params · 726fc60b
      Jerome Brunet 提交于
      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: NJerome Brunet <jbrunet@baylibre.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      726fc60b
    • C
      ASoC: SOF: remove redundant null checks of dai · c437ba03
      Colin Ian King 提交于
      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: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      c437ba03
  2. 02 5月, 2019 31 次提交
  3. 28 4月, 2019 6 次提交