aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--sound/soc/intel/boards/sof_sdw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index c5d555cc6f8e..ad1d01ebbcd9 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -1409,7 +1409,7 @@ static int create_sdw_dailink(struct snd_soc_card *card, int *link_index,
continue;
/* j reset after loop, adr_index only applies to first link */
- for (; j < adr_link_next->num_adr; j++) {
+ for (; j < adr_link_next->num_adr && codec_dlc_index < codec_num; j++) {
const struct snd_soc_acpi_endpoint *endpoints;
endpoints = adr_link_next->adr_d[j].endpoints;