mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 09:55:19 +02:00
ASoC: SOF: ipc4: check return value of snd_sof_ipc_msg_data
[ Upstream commit 2bd512626f
]
snd_sof_ipc_msg_data could return error.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20231129122021.679-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9badede607
commit
61db7910e8
|
@ -629,7 +629,14 @@ static void sof_ipc4_rx_msg(struct snd_sof_dev *sdev)
|
|||
return;
|
||||
|
||||
ipc4_msg->data_size = data_size;
|
||||
snd_sof_ipc_msg_data(sdev, NULL, ipc4_msg->data_ptr, ipc4_msg->data_size);
|
||||
err = snd_sof_ipc_msg_data(sdev, NULL, ipc4_msg->data_ptr, ipc4_msg->data_size);
|
||||
if (err < 0) {
|
||||
dev_err(sdev->dev, "failed to read IPC notification data: %d\n", err);
|
||||
kfree(ipc4_msg->data_ptr);
|
||||
ipc4_msg->data_ptr = NULL;
|
||||
ipc4_msg->data_size = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
sof_ipc4_log_header(sdev->dev, "ipc rx done ", ipc4_msg, true);
|
||||
|
|
Loading…
Reference in New Issue
Block a user