diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2021-07-29 03:16:01 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-07-29 16:35:45 +0200 |
commit | 51a3dd58424e7312e70445fcb4bca5924640af2c (patch) | |
tree | 250c38edf590d5645d64015a9763c936c5068dee /sound/soc/soc-core.c | |
parent | ASoC: soc-core: cleanup cppcheck warning at snd_soc_of_parse_audio_simple_wid... (diff) | |
download | linux-51a3dd58424e7312e70445fcb4bca5924640af2c.tar.xz linux-51a3dd58424e7312e70445fcb4bca5924640af2c.zip |
ASoC: soc-core: cleanup cppcheck warning at snd_soc_of_parse_audio_routing()
This patch cleanups below cppcheck warning.
sound/soc/soc-core.c:2931:9: style: The scope of the variable 'ret' can be reduced. [variableScope]
int i, ret;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8alyl67.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index e7d1bc9e31bb..c830e96afba2 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2927,7 +2927,7 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, struct device_node *np = card->dev->of_node; int num_routes; struct snd_soc_dapm_route *routes; - int i, ret; + int i; num_routes = of_property_count_strings(np, propname); if (num_routes < 0 || num_routes & 1) { @@ -2947,8 +2947,8 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, } for (i = 0; i < num_routes; i++) { - ret = of_property_read_string_index(np, propname, - 2 * i, &routes[i].sink); + int ret = of_property_read_string_index(np, propname, + 2 * i, &routes[i].sink); if (ret) { dev_err(card->dev, "ASoC: Property '%s' index %d could not be read: %d\n", |