Commit 0de7d835 authored by Dan Carpenter's avatar Dan Carpenter Committed by Takashi Iwai

ALSA: hda - silence uninitialized variable warning in activate_amp_in()

If snd_hda_get_conn_list() fails then "conn" isn't initialized.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a9291f46
...@@ -795,6 +795,8 @@ static void activate_amp_in(struct hda_codec *codec, struct nid_path *path, ...@@ -795,6 +795,8 @@ static void activate_amp_in(struct hda_codec *codec, struct nid_path *path,
hda_nid_t nid = path->path[i]; hda_nid_t nid = path->path[i];
nums = snd_hda_get_conn_list(codec, nid, &conn); nums = snd_hda_get_conn_list(codec, nid, &conn);
if (nums < 0)
return;
type = get_wcaps_type(get_wcaps(codec, nid)); type = get_wcaps_type(get_wcaps(codec, nid));
if (type == AC_WID_PIN || if (type == AC_WID_PIN ||
(type == AC_WID_AUD_IN && codec->single_adc_amp)) { (type == AC_WID_AUD_IN && codec->single_adc_amp)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment