aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <[email protected]>2021-07-29 10:15:42 +0900
committerMark Brown <[email protected]>2021-07-29 15:35:41 +0100
commit5ad76775a522f728d89687523accb061f3ffb1f6 (patch)
tree1fcbf7882d43853204a01968993fe70e7f5a9a4b
parentbce00560a28e0f62b0250652b611365f363c712b (diff)
ASoC: soc-core: cleanup cppcheck warning at snd_soc_daifmt_parse_format()
This patch cleanups below cppcheck warning. sound/soc/soc-core.c:3056:11: style: The scope of the variable 'i' can be reduced. [variableScope] int ret, i; ^ Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/soc-core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 6889380a98fc..d4e3a6c5b5bb 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3054,7 +3054,7 @@ EXPORT_SYMBOL_GPL(snd_soc_daifmt_clock_provider_from_bitmap);
unsigned int snd_soc_daifmt_parse_format(struct device_node *np,
const char *prefix)
{
- int ret, i;
+ int ret;
char prop[128];
unsigned int format = 0;
int bit, frame;
@@ -3088,6 +3088,8 @@ unsigned int snd_soc_daifmt_parse_format(struct device_node *np,
ret = of_property_read_string(np, prop, &str);
}
if (ret == 0) {
+ int i;
+
for (i = 0; i < ARRAY_SIZE(of_fmt_table); i++) {
if (strcmp(str, of_fmt_table[i].name) == 0) {
format |= of_fmt_table[i].val;