Merge series "ASoC: merge soc_pcm_hw_param() rollback and soc_pcm_hw_free()" from...
authorMark Brown <broonie@kernel.org>
Mon, 26 Oct 2020 18:37:15 +0000 (18:37 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 26 Oct 2020 18:37:15 +0000 (18:37 +0000)
commit0d8902d57646df202ad7bf602c734220d65fe75d
treea7331b1ee07ac47c9b7321b80c5f5c740a02d08a
parent155eacf880b86b7797e20b7841611323a0918b87
parent4662c59688b8db8834aab14f0d37a4f26fc0dd20
Merge series "ASoC: merge soc_pcm_hw_param() rollback and soc_pcm_hw_free()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Hi Mark

soc_pcm_hw_params() does rollback when failed (A),
but, it is almost same as soc_pcm_hw_free().

static int soc_pcm_hw_params(xxx)
{
...
if (ret < 0)
goto xxx_err;
...
return ret;

 ^ component_err:
 | ...
 | interface_err:
(A) ...
 | codec_err:
 | ...
 v return ret;
}

This kind of duplicated code can be a hotbed of bugs,
thus, this patch-set share soc_pcm_hw_free() and rollback.

Kuninori Morimoto (6):
  ASoC: soc.h: remove for_each_rtd_dais_rollback()
  ASoC: soc-pcm: move soc_pcm_hw_free() next to soc_pcm_hw_params()
  ASoC: soc-link: add mark for snd_soc_link_hw_params/free()
  ASoC: soc-component: add mark for snd_soc_pcm_component_hw_params/free()
  ASoC: soc-dai: add mark for snd_soc_dai_hw_params/free()
  ASoC: soc-pcm: add soc_pcm_hw_clean() and call it from soc_pcm_hw_params/free()

 include/sound/soc-component.h |   6 +-
 include/sound/soc-dai.h       |   4 +-
 include/sound/soc-link.h      |   3 +-
 include/sound/soc.h           |   7 +-
 sound/soc/soc-component.c     |  19 ++---
 sound/soc/soc-dai.c           |  13 +++-
 sound/soc/soc-dapm.c          |   4 +-
 sound/soc/soc-link.c          |  12 +++-
 sound/soc/soc-pcm.c           | 131 ++++++++++++++--------------------
 9 files changed, 97 insertions(+), 102 deletions(-)

--
2.25.1
sound/soc/soc-dapm.c