]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-pcm: fixup dpcm_prune_paths() loop continue
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 15 Oct 2019 03:59:38 +0000 (12:59 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 22 Oct 2019 18:12:21 +0000 (19:12 +0100)
commit98d98b5c3a459e3f05b0307a9c5723243d825ebf
treeeeaa5d2d8fb604f8b1c46c5f4c6fbbf8db2ae915
parente9437f7d56cc380cbbd65d6ae0f0a085ed18717f
ASoC: soc-pcm: fixup dpcm_prune_paths() loop continue

dpcm_prune_paths() is checking widget at 2 parts.
(A) is for CPU, (B) is for Codec.
If we focus to (A) part, continue at (a) is for (1) loop. But,
if we focus to (B) part, continue at (b) is for (2) loop, not for (1).
This is bug.
This patch fixup this issue.

static int dpcm_prune_paths(...)
{
...
   (1) for_each_dpcm_be(fe, stream, dpcm) {
...

 ^ widget = dai_get_widget(...);
 |
(A) if (widget && widget_in_list(...))
 | (a) continue;
 v
 ^ (2) for_each_rtd_codec_dai(...) {
 | widget = dai_get_widget(...);
(B)
 | if (widget && widget_in_list(...))
 v (b) continue;
}
...

Fixes: 510a8bf0e95d ("ASoC: pcm: Add support for DAI multicodec")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87blui64mf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c