From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v2 1/2] ALSA: hda - bug fix on return value when getting HDMI ELD info Date: Tue, 02 Apr 2013 11:57:26 +0200 Message-ID: References: <1364462422-30404-1-git-send-email-mengdong.lin@intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id E5013265163 for ; Tue, 2 Apr 2013 11:57:26 +0200 (CEST) In-Reply-To: <1364462422-30404-1-git-send-email-mengdong.lin@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: mengdong.lin@intel.com Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Thu, 28 Mar 2013 05:20:22 -0400, mengdong.lin@intel.com wrote: > > From: Mengdong Lin > > In function snd_hdmi_get_eld(), the variable 'ret' should be initialized to 0. > Otherwise it will be returned uninitialized as non-zero after ELD info is got > successfully. Thus hdmi_present_sense() will always assume ELD info is invalid > by mistake, and /proc file system cannot show the proper ELD info. > > Signed-off-by: Mengdong Lin Thanks, applied. Takashi > > diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c > index 7dd8463..d0d7ac1 100644 > --- a/sound/pci/hda/hda_eld.c > +++ b/sound/pci/hda/hda_eld.c > @@ -320,7 +320,7 @@ int snd_hdmi_get_eld(struct hda_codec *codec, hda_nid_t nid, > unsigned char *buf, int *eld_size) > { > int i; > - int ret; > + int ret = 0; > int size; > > /* > -- > 1.7.10.4 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >