The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [patch] ALSA hda: uninitialized variable fix
@ 2010-03-05 15:34 Frederik Deweerdt
  2010-03-05 15:41 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Frederik Deweerdt @ 2010-03-05 15:34 UTC (permalink / raw)
  To: tiwai; +Cc: linux-kernel

Hello Takashi,

Commit eaa9b3a748539651f50e3a234c8854e1b42a839a introduced the following
uninitialized warning:

	sound/pci/hda/patch_realtek.c: In function 'set_capture_mixer':
	sound/pci/hda/patch_realtek.c:4928: warning: 'pin' is used uninitialized in this function
	sound/pci/hda/patch_realtek.c:4918: note: 'pin' was declared here

It appears indeed that 'pin' needs to be initialized to 0.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index e8cbe21..5c89242 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4915,7 +4915,7 @@ static void fixup_automic_adc(struct hda_codec *codec)
 static void fixup_single_adc(struct hda_codec *codec)
 {
 	struct alc_spec *spec = codec->spec;
-	hda_nid_t pin;
+	hda_nid_t pin = 0;
 	int i;
 
 	/* search for the input pin; there must be only one */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-05 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05 15:34 [patch] ALSA hda: uninitialized variable fix Frederik Deweerdt
2010-03-05 15:41 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox