]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
Merge series "ASoC: merge soc_compr_open() rollback and soc_compr_free()" from Kunino...
authorMark Brown <broonie@kernel.org>
Thu, 26 Nov 2020 20:03:01 +0000 (20:03 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 26 Nov 2020 20:03:01 +0000 (20:03 +0000)
commit6d9b4dbf82c74e9c178e1ce2cff505f17cced23e
treeb70cb6930a396eb76b67df7592f477d309ee21dc
parent0858fc17b6f73f868352ed5f6cd7b655a17ff856
parent453d32c2f7f7375c223eaf3a0a32efbb71bbd3f3
Merge series "ASoC: merge soc_compr_open() rollback and soc_compr_free()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Hi Mark

soc_compr_open() does rollback when failed (A),
but, it is almost same as soc_compr_free().

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

 ^ machine_err:
 | ...
 | out:
(A) ...
 | pm_err:
 | ...
 v return ret;
}

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

Kuninori Morimoto (5):
  ASoC: soc-compress: move soc_compr_free() next to soc_compr_open()
  ASoC: soc-dai: add mark for snd_soc_dai_compr_startup/shutdown()
  ASoC: soc-component: add mark for snd_soc_component_compr_open/free()
  ASoC: soc-component: add mark for snd_soc_link_compr_startup/shutdown()
  ASoC: soc-compress: add soc_compr_clean() and call it from soc_compr_open/free()

 include/sound/soc-component.h |   6 +-
 include/sound/soc-dai.h       |   4 +-
 include/sound/soc-link.h      |   3 +-
 include/sound/soc.h           |   1 +
 sound/soc/soc-component.c     |  17 +++--
 sound/soc/soc-compress.c      | 115 +++++++++++++++++-----------------
 sound/soc/soc-dai.c           |  13 +++-
 sound/soc/soc-link.c          |  11 +++-
 8 files changed, 95 insertions(+), 75 deletions(-)

--
2.25.1