浏览代码

ALSA: hda - initialize audio InfoFrame to be all zero

This patch initialized the local audio InfoFrame variable 'ai' to be all zero,
thus the data bytes will indicate "Refer to Stream Header" by default.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin 11 年之前
父节点
当前提交
caaf5ef949
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      sound/pci/hda/patch_hdmi.c

+ 1 - 0
sound/pci/hda/patch_hdmi.c

@@ -1064,6 +1064,7 @@ static void hdmi_pin_setup_infoframe(struct hda_codec *codec,
 {
 {
 	union audio_infoframe ai;
 	union audio_infoframe ai;
 
 
+	memset(&ai, 0, sizeof(ai));
 	if (conn_type == 0) { /* HDMI */
 	if (conn_type == 0) { /* HDMI */
 		struct hdmi_audio_infoframe *hdmi_ai = &ai.hdmi;
 		struct hdmi_audio_infoframe *hdmi_ai = &ai.hdmi;