Commit 51a3dd58 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8alyl67.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 99c68653
......@@ -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,7 +2947,7 @@ 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,
int ret = of_property_read_string_index(np, propname,
2 * i, &routes[i].sink);
if (ret) {
dev_err(card->dev,
......
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