From: Dan Carpenter Date: Tue, 3 Mar 2020 10:18:58 +0000 (+0300) Subject: ASoC: SOF: Fix snd_sof_ipc_stream_posn() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=613cea5935e83cb5a7d182ee3f98d54620e102e2;p=linux.git ASoC: SOF: Fix snd_sof_ipc_stream_posn() 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 Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200303101858.ytehbrivocyp3cnf@kili.mountain Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index b63fc529b4568..78aa1da7c7a95 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -499,7 +499,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",