diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2025-02-12 02:23:20 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-02-16 23:51:00 +0000 |
commit | 11c1967f1a796bf2ff56a7118147f1d39d9f5ee0 (patch) | |
tree | 9f6525b11bdda3f6528ca2ade5f9db2e668946a9 | |
parent | 74e0fcbd705d4277267311f8f26a00bb8ce93820 (diff) |
ASoC: soc-pcm: no need to check dpcm->fe on dpcm_be_connect()
All dpcm from for_each_dpcm_be(fe, ...) loop has same fe
(that is the reason to connected to this list). We don't need to
check (dpcm->fe == fe) in this loop.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87wmdvyk87.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/soc-pcm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index ebe99d369ca9..0d556d350560 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1304,10 +1304,9 @@ static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe, snd_soc_dpcm_mutex_assert_held(fe); /* only add new dpcms */ - for_each_dpcm_be(fe, stream, dpcm) { - if (dpcm->be == be && dpcm->fe == fe) + for_each_dpcm_be(fe, stream, dpcm) + if (dpcm->be == be) return 0; - } fe_substream = snd_soc_dpcm_get_substream(fe, stream); be_substream = snd_soc_dpcm_get_substream(be, stream); |