]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/core/seq/oss/seq_oss_synth.c
ALSA: Kill snd_assert() in sound/core/*
[linux-2.6-omap-h63xx.git] / sound / core / seq / oss / seq_oss_synth.c
index e024e4588b829280b8871420c7d32a616352e7ef..945a27c34a9d1b2e5a9ed993930c26357fca2c60 100644 (file)
@@ -308,7 +308,8 @@ snd_seq_oss_synth_cleanup(struct seq_oss_devinfo *dp)
        struct seq_oss_synth *rec;
        struct seq_oss_synthinfo *info;
 
-       snd_assert(dp->max_synthdev <= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS, return);
+       if (snd_BUG_ON(dp->max_synthdev >= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS))
+               return;
        for (i = 0; i < dp->max_synthdev; i++) {
                info = &dp->synths[i];
                if (! info->opened)
@@ -402,7 +403,8 @@ snd_seq_oss_synth_reset(struct seq_oss_devinfo *dp, int dev)
        struct seq_oss_synth *rec;
        struct seq_oss_synthinfo *info;
 
-       snd_assert(dev >= 0 && dev < dp->max_synthdev, return);
+       if (snd_BUG_ON(dev < 0 || dev >= dp->max_synthdev))
+               return;
        info = &dp->synths[dev];
        if (! info->opened)
                return;