ASoC: soc-pcm: fix state tracking error in snd_soc_component_open/close()
ASoC component open/close and snd_soc_component_module_get/put are called independently for each component-substream pair, so the logic added in commit dd03907b ("ASoC: soc-pcm: call snd_soc_component_open/close() once") was not sufficient and led to PCM playback and module unload errors. Implement handling of failures directly in soc_pcm_components_open(), so that any successfully opened components are closed upon error with other components. This allows to clean up error handling in soc_pcm_open() without adding more state tracking. Fixes: dd03907b ("ASoC: soc-pcm: call snd_soc_component_open/close() once") Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Tested-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20200220094955.16968-1-kai.vehmanen@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment