diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 0b4afa0a3519832fa2781496f861f625ca0e769a..1cc31ac035225b5468bb826d1be5679ca423e7ec 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7015,7 +7015,6 @@ static void alc882_auto_init_analog_input(struct hda_codec *codec)
 
 	for (i = 0; i < AUTO_PIN_LAST; i++) {
 		hda_nid_t nid = spec->autocfg.input_pins[i];
-		unsigned int vref;
 		if (!nid)
 			continue;
 		alc_set_input_pin(codec, nid, AUTO_PIN_FRONT_MIC /*i*/);