ASoC: SOF: sof-audio: revisit sof_pcm_stream_free() error handling and logs
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 2 Apr 2024 15:18:24 +0000 (10:18 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 2 Apr 2024 16:14:54 +0000 (17:14 +0100)
commita6f2b279d22894e81b23464620d03da6429d9ab5
tree95c341e4304af40bcc2c22f010c858d41f8dfc58
parentbfe9225455c032c9dd5637047760cf59562e599f
ASoC: SOF: sof-audio: revisit sof_pcm_stream_free() error handling and logs

For some reason the existing code stops on the first error, which
potentially leaves the DMA and widgets in a weird state.

Change to free-up all resources even in case of errors.

Also add a more consistent error handling and logs, with the first
error code returned to the caller.

Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240402151828.175002-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/sof-audio.c