diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-08-08 17:12:47 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-08-08 17:12:47 +0200 |
commit | 736492eec82251fc8d5cc1a25567c9b4ca170eee (patch) | |
tree | 5b2a38e509965a9a79b009f8b8156eeb6754c0e7 /linux/drivers | |
parent | 563e4ad23c7c64ef519937a0922227ab6143f2f4 (diff) | |
download | mediapointer-dvb-s2-736492eec82251fc8d5cc1a25567c9b4ca170eee.tar.gz mediapointer-dvb-s2-736492eec82251fc8d5cc1a25567c9b4ca170eee.tar.bz2 |
backport commit 5e246b850df563224be26f1d409cf66fd6c968df
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Author: Takashi Iwai <tiwai@suse.de>
ALSA: Kill snd_assert() in other places
Kill snd_assert() in other places, either removed or replaced with
if () with snd_BUG_ON().
kernel-sync:
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-alsa.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index 6293eba34..5182d958c 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -493,10 +493,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; @@ -947,7 +949,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++) { |