summaryrefslogtreecommitdiff
path: root/sound/core/seq/oss/seq_oss_synth.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-12 15:17:14 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-12 15:17:14 +0200
commit620f2efcdc5c7a2db68da41bc3df3cf9a718024e (patch)
treeb1a0411e2588953777d0b10245b12044c33cef54 /sound/core/seq/oss/seq_oss_synth.c
parent04944b793e18ece23f63c0252646b310c1845940 (diff)
parentfd048088306656824958e7783ffcee27e241b361 (diff)
Merge branch 'linus' into x86/xsave
Diffstat (limited to 'sound/core/seq/oss/seq_oss_synth.c')
-rw-r--r--sound/core/seq/oss/seq_oss_synth.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
index e024e4588b82..945a27c34a9d 100644
--- a/sound/core/seq/oss/seq_oss_synth.c
+++ b/sound/core/seq/oss/seq_oss_synth.c
@@ -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;