diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-08-08 11:12:14 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-13 05:46:38 -0400 |
commit | da3cec35dd3c31d8706db4bf379372ce70d92118 (patch) | |
tree | 9379edebb1c7abc7a7a92ce3be30a35b77d9aa1d /sound/pci/echoaudio/echoaudio.c | |
parent | 622207dc31895b4e82c39100db8635d885c795e2 (diff) |
ALSA: Kill snd_assert() in sound/pci/*
Kill snd_assert() in sound/pci/*, either removed or replaced with
if () with snd_BUG_ON().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/echoaudio/echoaudio.c')
-rw-r--r-- | sound/pci/echoaudio/echoaudio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index e16dc92e82fb..160d47054922 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c | |||
@@ -503,7 +503,7 @@ static int init_engine(struct snd_pcm_substream *substream, | |||
503 | if (pipe->index >= 0) { | 503 | if (pipe->index >= 0) { |
504 | DE_HWP(("hwp_ie free(%d)\n", pipe->index)); | 504 | DE_HWP(("hwp_ie free(%d)\n", pipe->index)); |
505 | err = free_pipes(chip, pipe); | 505 | err = free_pipes(chip, pipe); |
506 | snd_assert(!err); | 506 | snd_BUG_ON(err); |
507 | chip->substream[pipe->index] = NULL; | 507 | chip->substream[pipe->index] = NULL; |
508 | } | 508 | } |
509 | 509 | ||
@@ -690,8 +690,10 @@ static int pcm_prepare(struct snd_pcm_substream *substream) | |||
690 | return -EINVAL; | 690 | return -EINVAL; |
691 | } | 691 | } |
692 | 692 | ||
693 | snd_assert(pipe_index < px_num(chip), return -EINVAL); | 693 | if (snd_BUG_ON(pipe_index >= px_num(chip))) |
694 | snd_assert(is_pipe_allocated(chip, pipe_index), return -EINVAL); | 694 | return -EINVAL; |
695 | if (snd_BUG_ON(!is_pipe_allocated(chip, pipe_index))) | ||
696 | return -EINVAL; | ||
695 | set_audio_format(chip, pipe_index, &format); | 697 | set_audio_format(chip, pipe_index, &format); |
696 | return 0; | 698 | return 0; |
697 | } | 699 | } |