mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
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>
This commit is contained in:
parent
041107289c
commit
6932b20d4f
1 changed files with 4 additions and 4 deletions
|
@ -1458,6 +1458,10 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream,
|
||||||
struct snd_soc_dapm_widget *widget;
|
struct snd_soc_dapm_widget *widget;
|
||||||
int i, new = 0, err;
|
int i, new = 0, err;
|
||||||
|
|
||||||
|
/* don't connect if FE is not running */
|
||||||
|
if (!fe->dpcm[stream].runtime && !fe->fe_compr)
|
||||||
|
return new;
|
||||||
|
|
||||||
/* Create any new FE <--> BE connections */
|
/* Create any new FE <--> BE connections */
|
||||||
for_each_dapm_widgets(list, i, widget) {
|
for_each_dapm_widgets(list, i, widget) {
|
||||||
|
|
||||||
|
@ -1482,10 +1486,6 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't connect if FE is not running */
|
|
||||||
if (!fe->dpcm[stream].runtime && !fe->fe_compr)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Filter for systems with 'component_chaining' enabled.
|
* Filter for systems with 'component_chaining' enabled.
|
||||||
* This helps to avoid unnecessary re-configuration of an
|
* This helps to avoid unnecessary re-configuration of an
|
||||||
|
|
Loading…
Reference in a new issue