All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: omap-pcm: Initialize DMA configuration
@ 2016-04-25 16:10 ` J.D. Schroeder
  0 siblings, 0 replies; 5+ messages in thread
From: J.D. Schroeder @ 2016-04-25 16:10 UTC (permalink / raw)
  To: linux-kernel, peter.ujfalusi, lgirdwood, broonie, perex, tiwai,
	jarkko.nikula, alsa-devel, linux-omap
  Cc: Jim Lodes, J.D. Schroeder

From: Jim Lodes <jim.lodes@garmin.com>

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>
---
 sound/soc/omap/omap-pcm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 99381a2..a84f677 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.
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-26 18:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-25 16:10 [PATCH] ASoC: omap-pcm: Initialize DMA configuration J.D. Schroeder
2016-04-25 16:10 ` J.D. Schroeder
2016-04-26 13:01 ` Jarkko Nikula
2016-04-26 13:01   ` Jarkko Nikula
2016-04-26 18:24 ` Applied "ASoC: omap-pcm: Initialize DMA configuration" to the asoc tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.