diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2021-08-03 08:00:49 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-08-03 20:27:12 +0300 |
commit | 872040f7980b929d75877e7b9d721ea808ce06e1 (patch) | |
tree | ecdfd86b72ae7ed2961fede16fbd59aea7ef1420 /sound | |
parent | 58f42dfd7977599b060996491412fcec688d025d (diff) | |
download | linux-872040f7980b929d75877e7b9d721ea808ce06e1.tar.xz |
ASoC: soc-ops: cleanup cppcheck warning at snd_soc_limit_volume()
This patch cleanups below cppcheck warning.
sound/soc/soc-ops.c:576:28: style: The scope of the variable 'mc' can be reduced. [variableScope]
struct soc_mixer_control *mc;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/8735rrw29q.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-ops.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index 9742e3c345b6..11be75f25300 100644 --- a/sound/soc/soc-ops.c +++ b/sound/soc/soc-ops.c @@ -575,7 +575,6 @@ int snd_soc_limit_volume(struct snd_soc_card *card, const char *name, int max) { struct snd_kcontrol *kctl; - struct soc_mixer_control *mc; int ret = -EINVAL; /* Sanity check for name and max */ @@ -584,7 +583,7 @@ int snd_soc_limit_volume(struct snd_soc_card *card, kctl = snd_soc_card_get_kcontrol(card, name); if (kctl) { - mc = (struct soc_mixer_control *)kctl->private_value; + struct soc_mixer_control *mc = (struct soc_mixer_control *)kctl->private_value; if (max <= mc->max) { mc->platform_max = max; ret = 0; |