From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753947Ab0CEPla (ORCPT ); Fri, 5 Mar 2010 10:41:30 -0500 Received: from cantor.suse.de ([195.135.220.2]:41539 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752837Ab0CEPl2 (ORCPT ); Fri, 5 Mar 2010 10:41:28 -0500 Date: Fri, 05 Mar 2010 16:41:27 +0100 Message-ID: From: Takashi Iwai To: Frederik Deweerdt Cc: linux-kernel@vger.kernel.org Subject: Re: [patch] ALSA hda: uninitialized variable fix In-Reply-To: <20100305153431.GA17493@gambetta> References: <20100305153431.GA17493@gambetta> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Fri, 5 Mar 2010 16:34:31 +0100, Frederik Deweerdt wrote: > > 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 Thanks, applied now. Takashi > 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 */ >