summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-06 11:49:55 +0200
committerTakashi Iwai <tiwai@suse.de>2008-08-06 11:49:55 +0200
commit774a60f23387b0c472d6031a40b6c777be7c236d (patch)
treea653e4a22e6e38ac93adeb5d9a2886eb370778cb /sound/core
parentf7292c4d9758494697468792ac3251428fc38f69 (diff)
parent0967d61ea0d8e8a7826bd8949cd93dd1e829ac55 (diff)
Merge branch 'upstream'
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/seq/oss/seq_oss_synth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
index 558dadbf45f1..e024e4588b82 100644
--- a/sound/core/seq/oss/seq_oss_synth.c
+++ b/sound/core/seq/oss/seq_oss_synth.c
@@ -604,6 +604,9 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in
{
struct seq_oss_synth *rec;
+ if (dev < 0 || dev >= dp->max_synthdev)
+ return -ENXIO;
+
if (dp->synths[dev].is_midi) {
struct midi_info minf;
snd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf);