Blob Blame History Raw
From bce00560a28e0f62b0250652b611365f363c712b Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu, 29 Jul 2021 10:15:38 +0900
Subject: [PATCH] ASoC: soc-core: cleanup cppcheck warning at snd_soc_get_dai_name()
Git-commit: bce00560a28e0f62b0250652b611365f363c712b
Patch-mainline: v5.15-rc1
References: jsc#PED-850

This patch cleanups below cppcheck warning.

sound/soc/soc-core.c:3203:22: style: The scope of the variable 'component_of_node' can be reduced. [variableScope]
 struct device_node *component_of_node;
                     ^

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v94tyl6t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 sound/soc/soc-core.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3201,12 +3201,11 @@ int snd_soc_get_dai_name(const struct of
 				const char **dai_name)
 {
 	struct snd_soc_component *pos;
-	struct device_node *component_of_node;
 	int ret = -EPROBE_DEFER;
 
 	mutex_lock(&client_mutex);
 	for_each_component(pos) {
-		component_of_node = soc_component_to_node(pos);
+		struct device_node *component_of_node = soc_component_to_node(pos);
 
 		if (component_of_node != args->np)
 			continue;