summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-jack.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-08-16 06:56:10 +0200
committerMark Brown <broonie@kernel.org>2021-08-16 14:29:33 +0200
commitc2dea1fba206b6e16940fb2bbf5209b30018833c (patch)
tree4b2743bbfac39f7d468213e26d80906b176017d1 /sound/soc/soc-jack.c
parentASoC: soc-dai: cleanup cppcheck warning at snd_soc_pcm_dai_new() (diff)
downloadlinux-c2dea1fba206b6e16940fb2bbf5209b30018833c.tar.xz
linux-c2dea1fba206b6e16940fb2bbf5209b30018833c.zip
ASoC: soc-jack: cleanup cppcheck warning at snd_soc_jack_report()
This patch cleanups below cppcheck warning. sound/soc/soc-jack.c:45:6: style: The scope of the variable 'enable' can be reduced. [variableScope] int enable; ^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87v946yolx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-jack.c')
-rw-r--r--sound/soc/soc-jack.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 0f1820f36b4d..11961e35ad02 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -42,7 +42,6 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
struct snd_soc_dapm_context *dapm;
struct snd_soc_jack_pin *pin;
unsigned int sync = 0;
- int enable;
if (!jack)
return;
@@ -58,7 +57,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
trace_snd_soc_jack_notify(jack, status);
list_for_each_entry(pin, &jack->pins, list) {
- enable = pin->mask & jack->status;
+ int enable = pin->mask & jack->status;
if (pin->invert)
enable = !enable;