]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: ipc: Remove redundant error check from sof_ipc_tx_message_unlocked
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 16 Sep 2021 12:57:25 +0000 (15:57 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 17 Sep 2021 12:17:45 +0000 (13:17 +0100)
commit93e6f3e7147c503e16843609da37444072616929
tree295e25569dc5e75269419cf242fe266ab3673229
parent2a408d425707e1f296fdcdbde543807168354e49
ASoC: SOF: ipc: Remove redundant error check from sof_ipc_tx_message_unlocked

If the snd_sof_dsp_send_msg() failed then we have already returned from
sof_ipc_tx_message_unlocked() with the error message.

There is no need to check if ret is really 0 after this and we can return
directly the return value from tx_wait_done()

At the same time make the remaining checks for error (ret) to match.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210916125725.25934-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc.c