]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ASoC: SOF: Fix snd_sof_ipc_stream_posn()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 3 Mar 2020 10:18:58 +0000 (13:18 +0300)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 13 Mar 2020 12:38:51 +0000 (13:38 +0100)
BugLink: https://bugs.launchpad.net/bugs/1867178
commit 613cea5935e83cb5a7d182ee3f98d54620e102e2 upstream.

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>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200303101858.ytehbrivocyp3cnf@kili.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
sound/soc/sof/ipc.c

index 8984d965037de302ef1aa6a6c6d6d1923ce2ae44..e7b1a80e2a14cded73e6736f3b96ed8188368c07 100644 (file)
@@ -497,7 +497,7 @@ int snd_sof_ipc_stream_posn(struct snd_sof_dev *sdev,
 
        /* 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",