Skip to content
Unverified Commit f8fc9ec5 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: soc-pcm: check DAI activity under soc_pcm_apply_symmetry()



soc_pcm_apply_symmetry() is used like below in all cases.

	if (snd_soc_dai_active(dai)) {
		err = soc_pcm_apply_symmetry(fe_substream, dai);
		...
	}

Because of this style, the code is deep nested.
This patch checks it under soc_pcm_apply_symmetry(), and makes code simple.

	static int soc_pcm_apply_symmetry(...)
	{
		...
=>		if (!snd_soc_dai_active(...))
			return 0;
		...
	}

=>	ret = soc_pcm_apply_symmetry();
	if (ret < 0)
		...

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0qhuobl.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0befe3a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment