Skip to content

Commit 301bda1

Browse files
morimotobroonie
authored andcommitted
ASoC: audio-graph-card2: fix index check on graph_parse_node_multi_nm()
commit d685aea ("ASoC: audio-graph-card2: fix off by one in graph_parse_node_multi_nm()") uses ">=" instead of ">" for index check, but it was wrong. The nm_idx will be increment at end of loop, thus, ">" is correct. while (1) { ... => if (*nm_idx > nm_max) break; ... (*nm_idx)++; } Without this patch, "Multi-Codec-1" sample on ${LINUX}/sound/soc/generic/audio-graph-card2-custom-sample.dtsi will be error. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 813c2f2 commit 301bda1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/generic/audio-graph-card2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ static int graph_parse_node_multi_nm(struct snd_soc_dai_link *dai_link,
556556
struct device_node *mcodec_port;
557557
int codec_idx;
558558

559-
if (*nm_idx >= nm_max)
559+
if (*nm_idx > nm_max)
560560
break;
561561

562562
mcpu_ep_n = of_get_next_child(mcpu_port, mcpu_ep_n);

0 commit comments

Comments
 (0)