]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: dapm: Avoid uninitialised variable warning
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Thu, 6 Sep 2018 16:41:55 +0000 (17:41 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 7 Sep 2018 10:35:08 +0000 (11:35 +0100)
commit9dc490a00946fc79c2b1cc8f9b390476a4561be7
tree30bd0b977391c7248394b66b7512595873be00c3
parent630d016a0ba30c805d489f854998e85f0957106b
ASoC: dapm: Avoid uninitialised variable warning

Commit 0a81dbb98b9b ("ASoC: dapm: Add support for multi-CODEC
CODEC to CODEC links") adds loops that iterate over multiple
CODECs in snd_soc_dai_link_event. This also introduced a compiler
warning for a potentially uninitialised variable in the case
no CODECs are present. This should never be the case as the
DAI link must by definition contain at least 1 CODEC however
probably best to avoid the compiler warning by initialising ret
to zero.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dapm.c