Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ALSA: hda - Release assigned pin/cvt at error path of hdmi_pcm_open()

commit 2ad779b upstream.

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.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
  • Loading branch information...
commit 45d12e995b298e90420f0f9172c972279a3ebcee 1 parent 6d6e66d
@tiwai tiwai authored Ben Hutchings committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 sound/pci/hda/patch_hdmi.c
View
6 sound/pci/hda/patch_hdmi.c
@@ -918,8 +918,12 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
if (!static_hdmi_pcm && eld->eld_valid) {
snd_hdmi_eld_update_pcm_info(eld, hinfo);
if (hinfo->channels_min > hinfo->channels_max ||
- !hinfo->rates || !hinfo->formats)
+ !hinfo->rates || !hinfo->formats) {
+ per_cvt->assigned = 0;
+ hinfo->nid = 0;
+ snd_hda_spdif_ctls_unassign(codec, pin_idx);
return -ENODEV;
+ }
}
/* Store the updated parameters */
Please sign in to comment.
Something went wrong with that request. Please try again.