summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-05-01 10:28:56 +0300
committerTakashi Iwai <tiwai@suse.de>2020-05-01 11:08:55 +0300
commit0127f59794b39debf2daf3c7ff755236630198ed (patch)
treec3447db8c21eca4af3b7326ca249335b81cd55f6 /sound/pci
parent87dc36482cab3a4ea34f203fc3f4da35712eb783 (diff)
downloadlinux-0127f59794b39debf2daf3c7ff755236630198ed.tar.xz
ALSA: hda/realtek - Fix unused variable warning w/o CONFIG_LEDS_TRIGGER_AUDIO
Cover with a proper ifdef around the variable declaration for fixing the following compilation warning without CONFIG_LEDS_TRIGGER_AUDIO: sound/pci/hda/patch_realtek.c: In function 'alc_fixup_hp_gpio_led': sound/pci/hda/patch_realtek.c:4134:6: warning: unused variable 'err' [-Wunused-variable] Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes: 87dc36482cab ("ALSA: hda/realtek - Add LED class support for micmute LED") Link: https://lore.kernel.org/r/20200501072857.13720-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b6a1c8b7f5d0..670e59b081d5 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4131,7 +4131,9 @@ static void alc_fixup_hp_gpio_led(struct hda_codec *codec,
unsigned int micmute_mask)
{
struct alc_spec *spec = codec->spec;
+#if IS_REACHABLE(CONFIG_LEDS_TRIGGER_AUDIO)
int err;
+#endif
alc_fixup_gpio(codec, action, mute_mask | micmute_mask);