From 78935913573b7c0397b5e3d4512ee0f67b280d3b Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Wed, 30 Mar 2022 13:19:19 -0700 Subject: 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: Peter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Daniel Baluta Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220330201926.1330402-5-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/sof/ipc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/soc/sof/ipc.c') diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index af2efc1c8436..166d4906698b 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -373,8 +373,8 @@ int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, u32 header, { int ret; - if (msg_bytes > SOF_IPC_MSG_MAX_SIZE || - reply_bytes > SOF_IPC_MSG_MAX_SIZE) + if (msg_bytes > ipc->max_payload_size || + reply_bytes > ipc->max_payload_size) return -ENOBUFS; /* Serialise IPC TX */ -- cgit v1.2.3-70-g09d2