summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_eld.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-11-13 12:51:49 +0100
committerTakashi Iwai <tiwai@suse.de>2015-12-04 15:06:45 +0100
commit18014fd793d5e73eec5f2c22eaa37a32b44748eb (patch)
tree255b0948324de63c79da28702ccff7035fb357e8 /sound/pci/hda/hda_eld.c
parent83266b6b60b6727af986e84a133dae24d394c3e8 (diff)
ALSA: hda - Do zero-clear in snd_hdmi_parse_eld() itself
Instead of doing in each caller side, snd_hdmi_parse_eld() does zero-clear of the parsed data by itself. This is safer and simplifies the upcoming code changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_eld.c')
-rw-r--r--sound/pci/hda/hda_eld.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index 563984dd2562..bc2e08257c2e 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -253,6 +253,7 @@ int snd_hdmi_parse_eld(struct hda_codec *codec, struct parsed_hdmi_eld *e,
int mnl;
int i;
+ memset(e, 0, sizeof(*e));
e->eld_ver = GRAB_BITS(buf, 0, 3, 5);
if (e->eld_ver != ELD_VER_CEA_861D &&
e->eld_ver != ELD_VER_PARTIAL) {