aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-08-05 10:11:33 +0900
committerMark Brown <broonie@kernel.org>2021-08-05 15:37:37 +0100
commitfcb3f196f808f2d53d3a8f0a728ffd61f9d44e11 (patch)
tree93ca8c6915840eaa520d0235269548223fc41377 /sound/soc/soc-dapm.c
parentASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_del_route() (diff)
downloadlinux-dev-fcb3f196f808f2d53d3a8f0a728ffd61f9d44e11.tar.xz
linux-dev-fcb3f196f808f2d53d3a8f0a728ffd61f9d44e11.zip
ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_add_routes()
This patch cleanups below cppcheck warning. sound/soc/soc-dapm.c:3082:9: style: The scope of the variable 'r' can be reduced. [variableScope] int i, r, ret = 0; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87mtpwu24b.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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index c7fb142f3462..9dd50b4899e3 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3080,11 +3080,11 @@ static int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm,
int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
const struct snd_soc_dapm_route *route, int num)
{
- int i, r, ret = 0;
+ int i, ret = 0;
mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
for (i = 0; i < num; i++) {
- r = snd_soc_dapm_add_route(dapm, route);
+ int r = snd_soc_dapm_add_route(dapm, route);
if (r < 0) {
dev_err(dapm->dev, "ASoC: Failed to add route %s -> %s -> %s\n",
route->source,