diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-10-13 13:57:10 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-10-13 15:14:44 +0200 |
commit | 0de7d8356241712406973a63572e61fea3233dc2 (patch) | |
tree | 83622ae158f1eeb74de5a2b5964110328d9c1a80 /sound/pci/hda | |
parent | a9291f461d2e727ac0812d7021653379fea4b782 (diff) | |
download | linux-0de7d8356241712406973a63572e61fea3233dc2.tar.bz2 |
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_generic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 28e265a88383..5cc65093d941 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -795,6 +795,8 @@ static void activate_amp_in(struct hda_codec *codec, struct nid_path *path, hda_nid_t nid = path->path[i]; nums = snd_hda_get_conn_list(codec, nid, &conn); + if (nums < 0) + return; type = get_wcaps_type(get_wcaps(codec, nid)); if (type == AC_WID_PIN || (type == AC_WID_AUD_IN && codec->single_adc_amp)) { |