Commit 872040f7 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/8735rrw29q.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 58f42dfd
...@@ -575,7 +575,6 @@ int snd_soc_limit_volume(struct snd_soc_card *card, ...@@ -575,7 +575,6 @@ int snd_soc_limit_volume(struct snd_soc_card *card,
const char *name, int max) const char *name, int max)
{ {
struct snd_kcontrol *kctl; struct snd_kcontrol *kctl;
struct soc_mixer_control *mc;
int ret = -EINVAL; int ret = -EINVAL;
/* Sanity check for name and max */ /* Sanity check for name and max */
...@@ -584,7 +583,7 @@ int snd_soc_limit_volume(struct snd_soc_card *card, ...@@ -584,7 +583,7 @@ int snd_soc_limit_volume(struct snd_soc_card *card,
kctl = snd_soc_card_get_kcontrol(card, name); kctl = snd_soc_card_get_kcontrol(card, name);
if (kctl) { 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) { if (max <= mc->max) {
mc->platform_max = max; mc->platform_max = max;
ret = 0; ret = 0;
......
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