From f7d67a9c254829930355d675e989c0dfa884242c Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Thu, 14 Sep 2023 15:51:15 +0300 Subject: [PATCH] ASoC: SOF: ipc4: Dump the payload also when set_get_data fails Move the out label to dump the message payload when the IPC message fails. The payload contains important information on what might have caused the error in firmware. Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230914125115.30904-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/sof/ipc4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/ipc4.c b/sound/soc/sof/ipc4.c index ab6eddd91bb77..9744627d69780 100644 --- a/sound/soc/sof/ipc4.c +++ b/sound/soc/sof/ipc4.c @@ -513,10 +513,10 @@ static int sof_ipc4_set_get_data(struct snd_sof_dev *sdev, void *data, if (!set && payload_bytes != offset) ipc4_msg->data_size = offset; +out: if (sof_debug_check_flag(SOF_DBG_DUMP_IPC_MESSAGE_PAYLOAD)) sof_ipc4_dump_payload(sdev, ipc4_msg->data_ptr, ipc4_msg->data_size); -out: mutex_unlock(&sdev->ipc->tx_mutex); return ret; -- 2.49.0