Skip to content

Commit

Permalink
ALSA: hda - hdmi_find_pcm_slot return value bug fix
Browse files Browse the repository at this point in the history
hdmi_find_pcm_slot return -EBUSY when not no pcm slot found,
not -ENODEV. So the caller should compare with -EBUSY.

Fixes: a76056f ('ALSA: hda - hdmi dynamically bind PCM to pin when monitor hotplug')
Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Libin Yang authored and Takashi Iwai committed Mar 1, 2016
1 parent eedf5e7 commit d10a80d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/patch_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d10a80d

Please sign in to comment.