Skip to content

Commit a7dbb60

Browse files
lrg-tibroonie
authored andcommitted
ASoC: core: Fix card RTD count for deferred probe.
Currently we increment the number of RTD's per card during the DAI link bind. This can cause an incorrect RTD count when we cannot find a component and defer the probe (and hence perform the DAI link bind for the card again). Fix the count so that it is cleared before every card registration and bind attempt. Signed-off-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 86fc499 commit a7dbb60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sound/soc/soc-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3119,6 +3119,7 @@ int snd_soc_register_card(struct snd_soc_card *card)
31193119
GFP_KERNEL);
31203120
if (card->rtd == NULL)
31213121
return -ENOMEM;
3122+
card->num_rtd = 0;
31223123
card->rtd_aux = &card->rtd[card->num_links];
31233124

31243125
for (i = 0; i < card->num_links; i++)

0 commit comments

Comments
 (0)