Commit 7453d6d4 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-dapm: cleanup cppcheck warning at dapm_wcache_lookup()

This patch cleanups below cppcheck warning.

sound/soc/soc-dapm.c:653:20: style: The scope of the variable 'wlist' can be reduced. [variableScope]
 struct list_head *wlist;
                   ^
sound/soc/soc-dapm.c:655:6: style: The scope of the variable 'i' can be reduced. [variableScope]
 int i = 0;
     ^
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y29gu25d.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f2553d46
......@@ -650,12 +650,11 @@ static struct snd_soc_dapm_widget *
dapm_wcache_lookup(struct snd_soc_dapm_wcache *wcache, const char *name)
{
struct snd_soc_dapm_widget *w = wcache->widget;
struct list_head *wlist;
const int depth = 2;
int i = 0;
if (w) {
wlist = &w->dapm->card->widgets;
struct list_head *wlist = &w->dapm->card->widgets;
const int depth = 2;
int i = 0;
list_for_each_entry_from(w, wlist, list) {
if (!strcmp(name, w->name))
......
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