diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-08-08 11:12:47 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-13 05:46:40 -0400 |
commit | 5e246b850df563224be26f1d409cf66fd6c968df (patch) | |
tree | 970e7faf60b86cb2c489a08ca506075c398165e5 /drivers/media | |
parent | da3cec35dd3c31d8706db4bf379372ce70d92118 (diff) |
ALSA: Kill snd_assert() in other places
Kill snd_assert() in other places, 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 'drivers/media')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-alsa.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index 9929d20320b4..26194a0ce927 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -488,10 +488,12 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, | |||
488 | period_size = params_period_bytes(hw_params); | 488 | period_size = params_period_bytes(hw_params); |
489 | periods = params_periods(hw_params); | 489 | periods = params_periods(hw_params); |
490 | 490 | ||
491 | snd_assert(period_size >= 0x100 && period_size <= 0x10000, | 491 | if (period_size < 0x100 || period_size > 0x10000) |
492 | return -EINVAL); | 492 | return -EINVAL; |
493 | snd_assert(periods >= 4, return -EINVAL); | 493 | if (periods < 4) |
494 | snd_assert(period_size * periods <= 1024 * 1024, return -EINVAL); | 494 | return -EINVAL; |
495 | if (period_size * periods > 1024 * 1024) | ||
496 | return -EINVAL; | ||
495 | 497 | ||
496 | dev = saa7134->dev; | 498 | dev = saa7134->dev; |
497 | 499 | ||
@@ -942,7 +944,8 @@ static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip) | |||
942 | unsigned int idx; | 944 | unsigned int idx; |
943 | int err; | 945 | int err; |
944 | 946 | ||
945 | snd_assert(chip != NULL, return -EINVAL); | 947 | if (snd_BUG_ON(!chip)) |
948 | return -EINVAL; | ||
946 | strcpy(card->mixername, "SAA7134 Mixer"); | 949 | strcpy(card->mixername, "SAA7134 Mixer"); |
947 | 950 | ||
948 | for (idx = 0; idx < ARRAY_SIZE(snd_saa7134_controls); idx++) { | 951 | for (idx = 0; idx < ARRAY_SIZE(snd_saa7134_controls); idx++) { |