public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: SOF: Fix snd_sof_ipc_stream_posn()
@ 2020-03-03 10:18 Dan Carpenter
  2020-03-03 11:39 ` Kai Vehmanen
  2020-03-03 17:07 ` Applied "ASoC: SOF: Fix snd_sof_ipc_stream_posn()" to the asoc tree Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Carpenter @ 2020-03-03 10:18 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: Guennadi Liakhovetski, alsa-devel, Kai Vehmanen, kernel-janitors,
	Takashi Iwai, Keyon Jie, Pierre-Louis Bossart, Ranjani Sridharan,
	Slawomir Blauciak, Mark Brown

We're passing "&posn" instead of "posn" so it ends up corrupting
memory instead of doing something useful.

Fixes: 53e0c72d98ba ("ASoC: SOF: Add support for IPC IO between DSP and Host")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 sound/soc/sof/ipc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c
index 22d296f95761..d6bf53dcd80b 100644
--- a/sound/soc/sof/ipc.c
+++ b/sound/soc/sof/ipc.c
@@ -524,7 +524,7 @@ int snd_sof_ipc_stream_posn(struct snd_soc_component *scomp,
 
 	/* send IPC to the DSP */
 	err = sof_ipc_tx_message(sdev->ipc,
-				 stream.hdr.cmd, &stream, sizeof(stream), &posn,
+				 stream.hdr.cmd, &stream, sizeof(stream), posn,
 				 sizeof(*posn));
 	if (err < 0) {
 		dev_err(sdev->dev, "error: failed to get stream %d position\n",
-- 
2.11.0


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

end of thread, other threads:[~2020-03-04  7:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-03 10:18 [PATCH] ASoC: SOF: Fix snd_sof_ipc_stream_posn() Dan Carpenter
2020-03-03 11:39 ` Kai Vehmanen
2020-03-03 15:36   ` Pierre-Louis Bossart
2020-03-04  7:07     ` Guennadi Liakhovetski
2020-03-04  7:46       ` Keyon Jie
2020-03-03 17:07 ` Applied "ASoC: SOF: Fix snd_sof_ipc_stream_posn()" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox