diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-02-01 08:01:27 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-02-01 08:01:27 -0500 |
commit | 2ad779b7329d6894a80df94e693e72eaa0d56790 (patch) | |
tree | 53265003a7b9fcb2ab611aa8145eb5b28c14351a /sound/pci/hda/patch_hdmi.c | |
parent | 4a7c516bf0cd697dbbee11db6258e3b3146e41a6 (diff) |
ALSA: hda - Release assigned pin/cvt at error path of hdmi_pcm_open()
If the driver detects and invalid ELD, it gives an open error.
But it forgot to release the assigned pin, converter and spdif ctls
before returning.
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 807a2aa1ff38..1b3b4ee3e8a7 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -1100,8 +1100,12 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, | |||
1100 | if (!static_hdmi_pcm && eld->eld_valid) { | 1100 | if (!static_hdmi_pcm && eld->eld_valid) { |
1101 | snd_hdmi_eld_update_pcm_info(eld, hinfo); | 1101 | snd_hdmi_eld_update_pcm_info(eld, hinfo); |
1102 | if (hinfo->channels_min > hinfo->channels_max || | 1102 | if (hinfo->channels_min > hinfo->channels_max || |
1103 | !hinfo->rates || !hinfo->formats) | 1103 | !hinfo->rates || !hinfo->formats) { |
1104 | per_cvt->assigned = 0; | ||
1105 | hinfo->nid = 0; | ||
1106 | snd_hda_spdif_ctls_unassign(codec, pin_idx); | ||
1104 | return -ENODEV; | 1107 | return -ENODEV; |
1108 | } | ||
1105 | } | 1109 | } |
1106 | 1110 | ||
1107 | /* Store the updated parameters */ | 1111 | /* Store the updated parameters */ |