未验证 提交 78935913 编写于 作者: P Peter Ujfalusi 提交者: Mark Brown

ASoC: SOF: ipc: Use ipc->max_payload_size for message/reply size checking

Use the ipc->max_payload_size for validating that the message or reply
size can be supported.
Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: NKai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: NBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: NDaniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: NRander Wang <rander.wang@intel.com>
Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220330201926.1330402-5-ranjani.sridharan@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 a3e6b369
...@@ -373,8 +373,8 @@ int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, u32 header, ...@@ -373,8 +373,8 @@ int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, u32 header,
{ {
int ret; int ret;
if (msg_bytes > SOF_IPC_MSG_MAX_SIZE || if (msg_bytes > ipc->max_payload_size ||
reply_bytes > SOF_IPC_MSG_MAX_SIZE) reply_bytes > ipc->max_payload_size)
return -ENOBUFS; return -ENOBUFS;
/* Serialise IPC TX */ /* Serialise IPC TX */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册