summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-07-29 10:15:56 +0900
committerMark Brown <broonie@kernel.org>2021-07-29 15:35:44 +0100
commit99c68653a56528ce66edf3d87bc050eee2ce0aee (patch)
tree68a670d80779e6ec7057f701a854d8716468e7f3 /sound/soc/soc-core.c
parenteaf2469c340b854f5c19339d613234ce2c774a38 (diff)
ASoC: soc-core: cleanup cppcheck warning at snd_soc_of_parse_audio_simple_widgets()
This patch cleanups below cppcheck warning. sound/soc/soc-core.c:2777:25: style: The scope of the variable 'ret' can be reduced. [variableScope] int i, j, num_widgets, ret; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pmv1yl6b.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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 34182e530877..e7d1bc9e31bb 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2773,7 +2773,7 @@ int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
struct device_node *np = card->dev->of_node;
struct snd_soc_dapm_widget *widgets;
const char *template, *wname;
- int i, j, num_widgets, ret;
+ int i, j, num_widgets;
num_widgets = of_property_count_strings(np, propname);
if (num_widgets < 0) {
@@ -2803,8 +2803,8 @@ int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
}
for (i = 0; i < num_widgets; i++) {
- ret = of_property_read_string_index(np, propname,
- 2 * i, &template);
+ int ret = of_property_read_string_index(np, propname,
+ 2 * i, &template);
if (ret) {
dev_err(card->dev,
"ASoC: Property '%s' index %d read error:%d\n",