diff options
author | Jim Lodes <jim.lodes@garmin.com> | 2016-04-25 12:10:07 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-04-26 11:26:59 -0400 |
commit | 989ff7754a27a1fcc0c3b2794c985b31811871a0 (patch) | |
tree | 0d071373b04e02fda97c5991cb7982db33bfda69 | |
parent | d4e44f1418d71cf53d685e236a95c525089e065a (diff) |
ASoC: omap-pcm: Initialize DMA configuration
Initialize the dma_slave_config for PCM DMA transfers,
instead of leaving it uninitialized. Keeps previous data on
the stack from giving us invalid values in uninitialized
members of the config structure.
Signed-off-by: Jim Lodes <jim.lodes@garmin.com>
Signed-off-by: J.D. Schroeder <jay.schroeder@garmin.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Reviewed-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 6bb623a2a4df..eb81b9a2293a 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -82,6 +82,8 @@ static int omap_pcm_hw_params(struct snd_pcm_substream *substream, | |||
82 | struct dma_chan *chan; | 82 | struct dma_chan *chan; |
83 | int err = 0; | 83 | int err = 0; |
84 | 84 | ||
85 | memset(&config, 0x00, sizeof(config)); | ||
86 | |||
85 | dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); | 87 | dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); |
86 | 88 | ||
87 | /* return if this is a bufferless transfer e.g. | 89 | /* return if this is a bufferless transfer e.g. |