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 /sound/drivers/vx/vx_uer.c | |
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 'sound/drivers/vx/vx_uer.c')
-rw-r--r-- | sound/drivers/vx/vx_uer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/drivers/vx/vx_uer.c b/sound/drivers/vx/vx_uer.c index fb8932af888d..0e1ba9b47904 100644 --- a/sound/drivers/vx/vx_uer.c +++ b/sound/drivers/vx/vx_uer.c | |||
@@ -163,13 +163,15 @@ static int vx_calc_clock_from_freq(struct vx_core *chip, int freq) | |||
163 | { | 163 | { |
164 | int hexfreq; | 164 | int hexfreq; |
165 | 165 | ||
166 | snd_assert(freq > 0, return 0); | 166 | if (snd_BUG_ON(freq <= 0)) |
167 | return 0; | ||
167 | 168 | ||
168 | hexfreq = (28224000 * 10) / freq; | 169 | hexfreq = (28224000 * 10) / freq; |
169 | hexfreq = (hexfreq + 5) / 10; | 170 | hexfreq = (hexfreq + 5) / 10; |
170 | 171 | ||
171 | /* max freq = 55125 Hz */ | 172 | /* max freq = 55125 Hz */ |
172 | snd_assert(hexfreq > 0x00000200, return 0); | 173 | if (snd_BUG_ON(hexfreq <= 0x00000200)) |
174 | return 0; | ||
173 | 175 | ||
174 | if (hexfreq <= 0x03ff) | 176 | if (hexfreq <= 0x03ff) |
175 | return hexfreq - 0x00000201; | 177 | return hexfreq - 0x00000201; |