diff options
author | Ross Zwisler <[email protected]> | 2019-04-29 12:25:17 -0600 |
---|---|---|
committer | Mark Brown <[email protected]> | 2019-05-03 14:55:18 +0900 |
commit | 0efa3334d65b7f421ba12382dfa58f6ff5bf83c4 (patch) | |
tree | 2ebe39014ecd1c29407a806784e6fbb05d335563 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 726fc60babe4a46e946e69a9dbd3e21aaec4d58e (diff) |
ASoC: Intel: avoid Oops if DMA setup fails
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: Ross Zwisler <[email protected]>
Cc: [email protected]
Acked-by: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions