瀏覽代碼

ALSA: hda: fix nid variable warning

Fixed compiler warning with possible uninitialized variable 'nid'.

  CC [M]  /home/mranostay/git/alsa-driver/pci/hda/patch_sigmatel.o
/home/mranostay/git/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c: In function
‘stac92xx_parse_auto_config’:
/home/mranostay/git/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:2815: warning: ‘nid’ may be used
uninitialized in this function

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Matthew Ranostay 16 年之前
父節點
當前提交
d21995e3e3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      sound/pci/hda/patch_sigmatel.c

+ 1 - 1
sound/pci/hda/patch_sigmatel.c

@@ -2816,7 +2816,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
 	static const char *chname[4] = {
 		"Front", "Surround", NULL /*CLFE*/, "Side"
 	};
-	hda_nid_t nid;
+	hda_nid_t nid = 0;
 	int i, err;
 
 	struct sigmatel_spec *spec = codec->spec;