Skip to contentSkip to conversation

used but uninitialized variable in ac97_codec

PATCH New Robert Love 1 participant 1 message Feb 12, 2003 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 used but uninitialized variable in ac97_codec

As far as I can tell, nothing initializes `err' prior to the snd_printk() that uses it. It is used later on, however.

So just do not print it out here.

Patch is against 2.5.60.

Robert Love

 sound/pci/ac97/ac97_codec.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
sound/pci/ac97/ac97_codec.c +1 -1
diff -urN linux-2.5.60/sound/pci/ac97/ac97_codec.c linux/sound/pci/ac97/ac97_codec.c
@@ -1887,7 +1887,7 @@
 		udelay(50);
 		if (ac97_reset_wait(ac97, HZ/2, 0) < 0 &&
 		    ac97_reset_wait(ac97, HZ/2, 1) < 0) {
-			snd_printk("AC'97 %d:%d does not respond - RESET [REC_GAIN = 0x%x]\n", ac97->num, ac97->addr, err);
+			snd_printk("AC'97 %d:%d does not respond - RESET\n", ac97->num, ac97->addr);
 			snd_ac97_free(ac97);
 			return -ENXIO;
 		}