Skip to contentSkip to conversation

ALSA: hda - hdmi_find_pcm_slot return value bug fix

PATCH Applied [email protected] 2 participants 2 messages Mar 1, 2016 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda - hdmi_find_pcm_slot return value bug fix

From: Libin Yang <[email protected]>

hdmi_find_pcm_slot return -EBUSY when not no pcm slot found, not -ENODEV. So the caller should compare with -EBUSY.

---
 sound/pci/hda/patch_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/patch_hdmi.c +1 -1
index d77509a..aa2d6a2 100644
@@ -1758,7 +1758,7 @@ static void hdmi_attach_hda_pcm(struct hdmi_spec *spec,
 	if (per_pin->pcm)
 		return;
 	idx = hdmi_find_pcm_slot(spec, per_pin);
-	if (idx == -ENODEV)
+	if (idx == -EBUSY)
 		return;
 	per_pin->pcm_idx = idx;
 	per_pin->pcm = get_hdmi_pcm(spec, idx);
Signature · 1 line
1.9.1
Applied
#1 lore raw
Quoted 7 lines · On Tue, 01 Mar 2016 08:18:26 +0100, [email protected] wrote:

From: Libin Yang <[email protected]>

hdmi_find_pcm_slot return -EBUSY when not no pcm slot found, not -ENODEV. So the caller should compare with -EBUSY.

Applied, thanks.

Takashi

Quoted 20 lines
---
 sound/pci/hda/patch_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/patch_hdmi.c +1 -1
index d77509a..aa2d6a2 100644
@@ -1758,7 +1758,7 @@ static void hdmi_attach_hda_pcm(struct hdmi_spec *spec,
 	if (per_pin->pcm)
 		return;
 	idx = hdmi_find_pcm_slot(spec, per_pin);
-	if (idx == -ENODEV)
+	if (idx == -EBUSY)
 		return;
 	per_pin->pcm_idx = idx;
 	per_pin->pcm = get_hdmi_pcm(spec, idx);
Signature · 1 line
1.9.1