From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 1/4] ALSA: pcm: Minor refactoring in snd_pcm_attach_substream() Date: Fri, 20 Feb 2015 19:52:54 +0100 Message-ID: References: <1424449408-22376-1-git-send-email-tiwai@suse.de> <1424449408-22376-2-git-send-email-tiwai@suse.de> 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 (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id C7FB92605FB for ; Fri, 20 Feb 2015 19:52:55 +0100 (CET) In-Reply-To: <1424449408-22376-2-git-send-email-tiwai@suse.de> 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: alsa-devel@alsa-project.org Cc: Liam Girdwood , Vinod Koul List-Id: alsa-devel@alsa-project.org At Fri, 20 Feb 2015 17:23:25 +0100, Takashi Iwai wrote: > > No functional changes at all. > > Signed-off-by: Takashi Iwai > --- > sound/core/pcm.c | 41 +++++++++++++++-------------------------- > 1 file changed, 15 insertions(+), 26 deletions(-) > > diff --git a/sound/core/pcm.c b/sound/core/pcm.c > index 0345e53a340c..89206e9c3578 100644 > --- a/sound/core/pcm.c > +++ b/sound/core/pcm.c > @@ -919,6 +919,9 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, > > if (snd_BUG_ON(!pcm || !rsubstream)) > return -ENXIO; > + if (snd_BUG_ON(stream != SNDRV_PCM_STREAM_PLAYBACK || > + stream != SNDRV_PCM_STREAM_CAPTURE)) Gah, this must be &&. Fixed in the topic/pcm-internal branch. Takashi