Commit 33be10b5 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-pcm: cleanup cppcheck warning at soc_pcm_components_close()

This patch cleanups below cppcheck warning.

sound/soc/soc-pcm.c:631:9: style: The scope of the variable 'r' can be reduced. [variableScope]
 int i, r, ret = 0;
        ^
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sg00zf2l.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2bc3e1f2
...@@ -633,10 +633,10 @@ static int soc_pcm_components_close(struct snd_pcm_substream *substream, ...@@ -633,10 +633,10 @@ static int soc_pcm_components_close(struct snd_pcm_substream *substream,
{ {
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_component *component; struct snd_soc_component *component;
int i, r, ret = 0; int i, ret = 0;
for_each_rtd_components(rtd, i, component) { for_each_rtd_components(rtd, i, component) {
r = snd_soc_component_close(component, substream, rollback); int r = snd_soc_component_close(component, substream, rollback);
if (r < 0) if (r < 0)
ret = r; /* use last ret */ ret = r; /* use last ret */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment