From: Peter Ujfalusi Date: Thu, 14 Sep 2023 12:51:15 +0000 (+0300) Subject: ASoC: SOF: ipc4: Dump the payload also when set_get_data fails X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f7d67a9c254829930355d675e989c0dfa884242c;p=linux.git 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 --- 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;