diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2021-08-05 10:11:28 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-08-05 15:37:36 +0100 |
commit | fd5ad2346148373890b4e7e7e0b1d7b208772a68 (patch) | |
tree | 50bb9675a7f702724ce88e487b272dacc9b1cd72 /sound/soc/soc-dapm.c | |
parent | a71657947d74fbc9e0184079f9e1941d70ccb52c (diff) | |
download | lwn-fd5ad2346148373890b4e7e7e0b1d7b208772a68.tar.gz lwn-fd5ad2346148373890b4e7e7e0b1d7b208772a68.zip |
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: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8acu24f.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index bd3b443019fb..c7fb142f3462 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3006,7 +3006,6 @@ err: static int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_route *route) { - struct snd_soc_dapm_widget *wsource, *wsink; struct snd_soc_dapm_path *path, *p; const char *sink; const char *source; @@ -3044,8 +3043,8 @@ static int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm, } if (path) { - wsource = path->source; - wsink = path->sink; + struct snd_soc_dapm_widget *wsource = path->source; + struct snd_soc_dapm_widget *wsink = path->sink; dapm_mark_dirty(wsource, "Route removed"); dapm_mark_dirty(wsink, "Route removed"); |