From: Kuninori Morimoto Date: Wed, 12 Feb 2025 02:23:20 +0000 (+0000) Subject: ASoC: soc-pcm: no need to check dpcm->fe on dpcm_be_connect() X-Git-Tag: v6.15-rc1~173^2~4^2~108^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11c1967f1a796bf2ff56a7118147f1d39d9f5ee0;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/87wmdvyk87.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- 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);