Skip to content

Commit 63d6838

Browse files
plbossartbroonie
authored andcommitted
ASoC: soc-core: fix for_rtd_codec_dai_rollback() macro
The use of parentheses to protect the argument is fine for (i)++ but not for (--i). Fixes: 83f94a2 ("ASoC: soc-core: add snd_soc_close_delayed_work()") Signed-off-by: Pierre-Louis Bossart <[email protected]> Acked-by: Kuninori Morimoto <[email protected]> Cc: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 242c46c commit 63d6838

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/sound/soc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ struct snd_soc_pcm_runtime {
11571157
((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]); \
11581158
(i)++)
11591159
#define for_each_rtd_codec_dai_rollback(rtd, i, dai) \
1160-
for (; ((--i) >= 0) && ((dai) = rtd->codec_dais[i]);)
1160+
for (; (--(i) >= 0) && ((dai) = rtd->codec_dais[i]);)
11611161

11621162
void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);
11631163

0 commit comments

Comments
 (0)