]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: core: Do not cleanup uninitialized dais on soc_pcm_open failure
authorCezary Rojewski <cezary.rojewski@intel.com>
Mon, 7 Sep 2020 11:19:39 +0000 (13:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 10:59:54 +0000 (12:59 +0200)
commit5fc19caaf6b759fc80e5fec6ae56f4bb25a1cae0
treeb06e943650a27d96992878b4ec3acf1e55fb44ea
parentbdfdc751259e660073f5ca47ed6685464fde8e35
ASoC: core: Do not cleanup uninitialized dais on soc_pcm_open failure

[ Upstream commit 20244b2a8a8728c63233d33146e007dcacbcc5c4 ]

Introduce for_each_rtd_dais_rollback macro which behaves exactly like
for_each_codec_dais_rollback and its cpu_dais equivalent but for all
dais instead.

Use newly added macro to fix soc_pcm_open error path and prevent
uninitialized dais from being cleaned-up.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Fixes: 5d9fa03e6c35 ("ASoC: soc-pcm: tidyup soc_pcm_open() order")
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20200907111939.16169-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/sound/soc.h
sound/soc/soc-pcm.c