[alsa-devel] [PATCH] ALSA: hda - hdmi_find_pcm_slot return value bug fix
From: Libin Yang libin.yang@linux.intel.com
hdmi_find_pcm_slot return -EBUSY when not no pcm slot found, not -ENODEV. So the caller should compare with -EBUSY.
Signed-off-by: Libin Yang libin.yang@linux.intel.com --- sound/pci/hda/patch_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index d77509a..aa2d6a2 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -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);
On Tue, 01 Mar 2016 08:18:26 +0100, libin.yang@linux.intel.com wrote:
From: Libin Yang libin.yang@linux.intel.com
hdmi_find_pcm_slot return -EBUSY when not no pcm slot found, not -ENODEV. So the caller should compare with -EBUSY.
Signed-off-by: Libin Yang libin.yang@linux.intel.com
Applied, thanks.
Takashi
sound/pci/hda/patch_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index d77509a..aa2d6a2 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -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);
-- 1.9.1
participants (2)
-
libin.yang@linux.intel.com
-
Takashi Iwai