[alsa-devel] [PATCH 1/4] ALSA: pcm: Minor refactoring in snd_pcm_attach_substream()

Takashi Iwai tiwai at suse.de
Fri Feb 20 19:52:54 CET 2015


At Fri, 20 Feb 2015 17:23:25 +0100,
Takashi Iwai wrote:
> 
> No functional changes at all.
> 
> Signed-off-by: Takashi Iwai <tiwai at suse.de>
> ---
>  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


More information about the Alsa-devel mailing list