diff mbox series

[01/12] ASoC: soc-pcm: no need to check dpcm->fe on dpcm_be_connect()

Message ID 87wmdvyk87.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State Accepted
Commit 11c1967f1a796bf2ff56a7118147f1d39d9f5ee0
Headers show
Series ASoC: random cleanup | expand

Commit Message

Kuninori Morimoto Feb. 12, 2025, 2:23 a.m. UTC
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>
---
 sound/soc/soc-pcm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index ebe99d369ca9e..0d556d3505602 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);