diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 23:56:33 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 23:56:33 -0200 |
commit | d509e840df58b01c75b9fb7cb8c0be9f7ab023ce (patch) | |
tree | c2907f50634857fd993dd69d77399420185018ac /linux/drivers/media/video/saa7134 | |
parent | 58f52d61d57fe5a5ed3cf4542663f6641e53eff7 (diff) | |
parent | 71860dbdbc561e6e67353843a30183bcaa08b94f (diff) | |
download | mediapointer-dvb-s2-d509e840df58b01c75b9fb7cb8c0be9f7ab023ce.tar.gz mediapointer-dvb-s2-d509e840df58b01c75b9fb7cb8c0be9f7ab023ce.tar.bz2 |
merge: http://linuxtv.org/hg/~tmerle/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/saa7134')
-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++) { |