ASoC: soc-pcm.c: check fe condition at out of loop
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 30 Aug 2022 03:17:19 +0000 (03:17 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 5 Sep 2022 12:09:07 +0000 (13:09 +0100)
commit6932b20d4f41dc01dc58c0afb335e688575c7d54
treeb6ac977ee6d78ded1a50c09b0aa5fea50b574e09
parent041107289c5cebb0693a55c432ab50862a450476
ASoC: soc-pcm.c: check fe condition at out of loop

Current dpcm_add_paths() is checking fe condition in loop (= A),
but fe condition (X) is not related to the loop (B).

(X) static int dpcm_add_paths(fe, stream, ...)
{
...
(B) for_each_dapm_widgets(list, i, widget) {
...
(A) if (!fe->dpcm[stream].runtime && !fe->fe_compr)
continue;
...
}
...
}

This patch checks fe condition at out of loop

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pmgi4dz4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c