]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/echoaudio/echoaudio.c
ALSA: Kill snd_assert() in sound/pci/*
[linux-2.6-omap-h63xx.git] / sound / pci / echoaudio / echoaudio.c
index e16dc92e82fb4359e5ae92b11300fce4dd9e9c9c..160d470549227cbba9ac91e7ef2b2dc5b4b149dc 100644 (file)
@@ -503,7 +503,7 @@ static int init_engine(struct snd_pcm_substream *substream,
        if (pipe->index >= 0) {
                DE_HWP(("hwp_ie free(%d)\n", pipe->index));
                err = free_pipes(chip, pipe);
-               snd_assert(!err);
+               snd_BUG_ON(err);
                chip->substream[pipe->index] = NULL;
        }
 
@@ -690,8 +690,10 @@ static int pcm_prepare(struct snd_pcm_substream *substream)
                return -EINVAL;
        }
 
-       snd_assert(pipe_index < px_num(chip), return -EINVAL);
-       snd_assert(is_pipe_allocated(chip, pipe_index), return -EINVAL);
+       if (snd_BUG_ON(pipe_index >= px_num(chip)))
+               return -EINVAL;
+       if (snd_BUG_ON(!is_pipe_allocated(chip, pipe_index)))
+               return -EINVAL;
        set_audio_format(chip, pipe_index, &format);
        return 0;
 }