[F/Unstable/OEM-5.6] [PATCH 4/5] ALSA: hda/realtek - Fix unused variable warning w/o CONFIG_LEDS_TRIGGER_AUDIO
Kai-Heng Feng
kai.heng.feng at canonical.com
Tue May 5 06:02:39 UTC 2020
From: Takashi Iwai <tiwai at suse.de>
BugLink: https://bugs.launchpad.net/bugs/1876859
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 at 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 at suse.de>
(cherry picked from commit 0127f59794b39debf2daf3c7ff755236630198ed linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
---
sound/pci/hda/patch_realtek.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f674e85091fb..6c7885e071f3 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4120,7 +4120,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);
--
2.17.1
More information about the kernel-team
mailing list