From: Jim Lodes Date: Mon, 25 Apr 2016 16:10:07 +0000 (-0500) Subject: ASoC: omap-pcm: Initialize DMA configuration X-Git-Tag: v4.7-rc1~11^2^2~9^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=989ff7754a27a1fcc0c3b2794c985b31811871a0;p=karo-tx-linux.git 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 Signed-off-by: J.D. Schroeder Acked-by: Jarkko Nikula Reviewed-by: Jarkko Nikula Signed-off-by: Mark Brown --- 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, struct dma_chan *chan; int err = 0; + memset(&config, 0x00, sizeof(config)); + dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); /* return if this is a bufferless transfer e.g.