aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/korg1212
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-08 11:12:14 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-13 05:46:38 -0400
commitda3cec35dd3c31d8706db4bf379372ce70d92118 (patch)
tree9379edebb1c7abc7a7a92ce3be30a35b77d9aa1d /sound/pci/korg1212
parent622207dc31895b4e82c39100db8635d885c795e2 (diff)
ALSA: Kill snd_assert() in sound/pci/*
Kill snd_assert() in sound/pci/*, 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/pci/korg1212')
-rw-r--r--sound/pci/korg1212/korg1212.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c
index 4a44c0f20f76..5f8006b42750 100644
--- a/sound/pci/korg1212/korg1212.c
+++ b/sound/pci/korg1212/korg1212.c
@@ -1281,7 +1281,8 @@ static int snd_korg1212_silence(struct snd_korg1212 *korg1212, int pos, int coun
1281 1281
1282 K1212_DEBUG_PRINTK_VERBOSE("K1212_DEBUG: snd_korg1212_silence pos=%d offset=%d size=%d count=%d\n", 1282 K1212_DEBUG_PRINTK_VERBOSE("K1212_DEBUG: snd_korg1212_silence pos=%d offset=%d size=%d count=%d\n",
1283 pos, offset, size, count); 1283 pos, offset, size, count);
1284 snd_assert(pos + count <= K1212_MAX_SAMPLES, return -EINVAL); 1284 if (snd_BUG_ON(pos + count > K1212_MAX_SAMPLES))
1285 return -EINVAL;
1285 1286
1286 for (i=0; i < count; i++) { 1287 for (i=0; i < count; i++) {
1287#if K1212_DEBUG_LEVEL > 0 1288#if K1212_DEBUG_LEVEL > 0
@@ -1306,7 +1307,8 @@ static int snd_korg1212_copy_to(struct snd_korg1212 *korg1212, void __user *dst,
1306 1307
1307 K1212_DEBUG_PRINTK_VERBOSE("K1212_DEBUG: snd_korg1212_copy_to pos=%d offset=%d size=%d\n", 1308 K1212_DEBUG_PRINTK_VERBOSE("K1212_DEBUG: snd_korg1212_copy_to pos=%d offset=%d size=%d\n",
1308 pos, offset, size); 1309 pos, offset, size);
1309 snd_assert(pos + count <= K1212_MAX_SAMPLES, return -EINVAL); 1310 if (snd_BUG_ON(pos + count > K1212_MAX_SAMPLES))
1311 return -EINVAL;
1310 1312
1311 for (i=0; i < count; i++) { 1313 for (i=0; i < count; i++) {
1312#if K1212_DEBUG_LEVEL > 0 1314#if K1212_DEBUG_LEVEL > 0
@@ -1336,7 +1338,8 @@ static int snd_korg1212_copy_from(struct snd_korg1212 *korg1212, void __user *sr
1336 K1212_DEBUG_PRINTK_VERBOSE("K1212_DEBUG: snd_korg1212_copy_from pos=%d offset=%d size=%d count=%d\n", 1338 K1212_DEBUG_PRINTK_VERBOSE("K1212_DEBUG: snd_korg1212_copy_from pos=%d offset=%d size=%d count=%d\n",
1337 pos, offset, size, count); 1339 pos, offset, size, count);
1338 1340
1339 snd_assert(pos + count <= K1212_MAX_SAMPLES, return -EINVAL); 1341 if (snd_BUG_ON(pos + count > K1212_MAX_SAMPLES))
1342 return -EINVAL;
1340 1343
1341 for (i=0; i < count; i++) { 1344 for (i=0; i < count; i++) {
1342#if K1212_DEBUG_LEVEL > 0 1345#if K1212_DEBUG_LEVEL > 0