Commit fd5ad234 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

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

This patch cleanups below cppcheck warning.

sound/soc/soc-dapm.c:3007:30: style: The scope of the variable 'wsource' can be reduced. [variableScope]
 struct snd_soc_dapm_widget *wsource, *wsink;
                             ^
sound/soc/soc-dapm.c:3007:40: style: The scope of the variable 'wsink' can be reduced. [variableScope]
 struct snd_soc_dapm_widget *wsource, *wsink;
                                       ^
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8acu24f.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a7165794
...@@ -3006,7 +3006,6 @@ static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm, ...@@ -3006,7 +3006,6 @@ static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm,
static int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm, static int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm,
const struct snd_soc_dapm_route *route) const struct snd_soc_dapm_route *route)
{ {
struct snd_soc_dapm_widget *wsource, *wsink;
struct snd_soc_dapm_path *path, *p; struct snd_soc_dapm_path *path, *p;
const char *sink; const char *sink;
const char *source; const char *source;
...@@ -3044,8 +3043,8 @@ static int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm, ...@@ -3044,8 +3043,8 @@ static int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm,
} }
if (path) { if (path) {
wsource = path->source; struct snd_soc_dapm_widget *wsource = path->source;
wsink = path->sink; struct snd_soc_dapm_widget *wsink = path->sink;
dapm_mark_dirty(wsource, "Route removed"); dapm_mark_dirty(wsource, "Route removed");
dapm_mark_dirty(wsink, "Route removed"); dapm_mark_dirty(wsink, "Route removed");
......
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