From: Takashi Iwai Subject: Re: [PATCH] ALSA: hda - hdmi_find_pcm_slot return value bug fix Date: Tue, 01 Mar 2016 10:30:14 +0100 Message-ID: References: <1456816706-21009-1-git-send-email-libin.yang@linux.intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id F02E8261546 for ; Tue, 1 Mar 2016 10:30:15 +0100 (CET) In-Reply-To: <1456816706-21009-1-git-send-email-libin.yang@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: libin.yang@linux.intel.com Cc: libin.yang@intel.com, mengdong.lin@intel.com, alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Tue, 01 Mar 2016 08:18:26 +0100, libin.yang@linux.intel.com wrote: > > From: Libin Yang > > 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 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 >