From: Frederik Deweerdt <frederik.deweerdt@xprog.eu>
To: tiwai@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: [patch] ALSA hda: uninitialized variable fix
Date: Fri, 5 Mar 2010 16:34:31 +0100 [thread overview]
Message-ID: <20100305153431.GA17493@gambetta> (raw)
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 */
next reply other threads:[~2010-03-05 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-05 15:34 Frederik Deweerdt [this message]
2010-03-05 15:41 ` [patch] ALSA hda: uninitialized variable fix Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100305153431.GA17493@gambetta \
--to=frederik.deweerdt@xprog.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox