]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/saa7134/saa7134-alsa.c
ALSA: Kill snd_assert() in other places
[linux-2.6-omap-h63xx.git] / drivers / media / video / saa7134 / saa7134-alsa.c
index 9929d20320b485b7f5f9740360d599db799ca6ce..26194a0ce927c4e414c66c89dbabf29d8a00fdbd 100644 (file)
@@ -488,10 +488,12 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream,
        period_size = params_period_bytes(hw_params);
        periods = params_periods(hw_params);
 
-       snd_assert(period_size >= 0x100 && period_size <= 0x10000,
-                  return -EINVAL);
-       snd_assert(periods >= 4, return -EINVAL);
-       snd_assert(period_size * periods <= 1024 * 1024, return -EINVAL);
+       if (period_size < 0x100 || period_size > 0x10000)
+               return -EINVAL;
+       if (periods < 4)
+               return -EINVAL;
+       if (period_size * periods > 1024 * 1024)
+               return -EINVAL;
 
        dev = saa7134->dev;
 
@@ -942,7 +944,8 @@ static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip)
        unsigned int idx;
        int err;
 
-       snd_assert(chip != NULL, return -EINVAL);
+       if (snd_BUG_ON(!chip))
+               return -EINVAL;
        strcpy(card->mixername, "SAA7134 Mixer");
 
        for (idx = 0; idx < ARRAY_SIZE(snd_saa7134_controls); idx++) {