]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: soc-core: fix for_rtd_codec_dai_rollback() macro
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 19 Feb 2020 22:21:30 +0000 (16:21 -0600)
committerMark Brown <broonie@kernel.org>
Thu, 20 Feb 2020 12:21:42 +0000 (12:21 +0000)
The use of parentheses to protect the argument is fine for (i)++ but
not for (--i).

Fixes: 83f94a2e293d61 ("ASoC: soc-core: add snd_soc_close_delayed_work()")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20200219222130.29933-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h

index f0e4f36f83bfa7d349f54d278cc46e5db235d8bb..8a2266676b2dd2054e7e93903a31f9dfd57fa80e 100644 (file)
@@ -1157,7 +1157,7 @@ struct snd_soc_pcm_runtime {
             ((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]); \
             (i)++)
 #define for_each_rtd_codec_dai_rollback(rtd, i, dai)           \
-       for (; ((--i) >= 0) && ((dai) = rtd->codec_dais[i]);)
+       for (; (--(i) >= 0) && ((dai) = rtd->codec_dais[i]);)
 
 void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);