Skip to content

Commit

Permalink
ALSA: hda - bug fix on return value when getting HDMI ELD info
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
Acked-by: David Henningsson <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
mengdonglin authored and tiwai committed Apr 2, 2013
1 parent ea019fd commit 2ef5692
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/hda_eld.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 2ef5692

Please sign in to comment.