Commit bedc3572 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

ASoC: SOF: ipc-msg-injector: Fix reversed if statement

This if statement is reversed.  In fact, the condition can just be
deleted because writing zero bytes is a no-op.

Fixes: 066c6762 ("ASoC: SOF: ipc-msg-injector: Add support for IPC4 messages")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/Yph+T3PpGCdPsEDj@kiliSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent d9a251a0
......@@ -200,7 +200,6 @@ static ssize_t sof_msg_inject_ipc4_dfs_write(struct file *file,
return -EFAULT;
count -= size;
if (!count) {
/* Copy the payload */
size = simple_write_to_buffer(ipc4_msg->data_ptr,
priv->max_msg_size, ppos, buffer,
......@@ -209,7 +208,6 @@ static ssize_t sof_msg_inject_ipc4_dfs_write(struct file *file,
return size;
if (size != count)
return -EFAULT;
}
ipc4_msg->data_size = count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment