diff options
| -rw-r--r-- | sound/core/seq/oss/seq_oss_event.c | 14 | ||||
| -rw-r--r-- | sound/core/vmaster.c | 5 |
2 files changed, 16 insertions, 3 deletions
diff --git a/sound/core/seq/oss/seq_oss_event.c b/sound/core/seq/oss/seq_oss_event.c index 066f5f3e3f4c..c3908862bc8b 100644 --- a/sound/core/seq/oss/seq_oss_event.c +++ b/sound/core/seq/oss/seq_oss_event.c | |||
| @@ -285,7 +285,12 @@ local_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev | |||
| 285 | static int | 285 | static int |
| 286 | note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev) | 286 | note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev) |
| 287 | { | 287 | { |
| 288 | struct seq_oss_synthinfo *info = &dp->synths[dev]; | 288 | struct seq_oss_synthinfo *info; |
| 289 | |||
| 290 | if (!snd_seq_oss_synth_is_valid(dp, dev)) | ||
| 291 | return -ENXIO; | ||
| 292 | |||
| 293 | info = &dp->synths[dev]; | ||
| 289 | switch (info->arg.event_passing) { | 294 | switch (info->arg.event_passing) { |
| 290 | case SNDRV_SEQ_OSS_PROCESS_EVENTS: | 295 | case SNDRV_SEQ_OSS_PROCESS_EVENTS: |
| 291 | if (! info->ch || ch < 0 || ch >= info->nr_voices) { | 296 | if (! info->ch || ch < 0 || ch >= info->nr_voices) { |
| @@ -340,7 +345,12 @@ note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, st | |||
| 340 | static int | 345 | static int |
| 341 | note_off_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev) | 346 | note_off_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev) |
| 342 | { | 347 | { |
| 343 | struct seq_oss_synthinfo *info = &dp->synths[dev]; | 348 | struct seq_oss_synthinfo *info; |
| 349 | |||
| 350 | if (!snd_seq_oss_synth_is_valid(dp, dev)) | ||
| 351 | return -ENXIO; | ||
| 352 | |||
| 353 | info = &dp->synths[dev]; | ||
| 344 | switch (info->arg.event_passing) { | 354 | switch (info->arg.event_passing) { |
| 345 | case SNDRV_SEQ_OSS_PROCESS_EVENTS: | 355 | case SNDRV_SEQ_OSS_PROCESS_EVENTS: |
| 346 | if (! info->ch || ch < 0 || ch >= info->nr_voices) { | 356 | if (! info->ch || ch < 0 || ch >= info->nr_voices) { |
diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c index 857586135d18..0097f3619faa 100644 --- a/sound/core/vmaster.c +++ b/sound/core/vmaster.c | |||
| @@ -213,7 +213,10 @@ static int slave_put(struct snd_kcontrol *kcontrol, | |||
| 213 | } | 213 | } |
| 214 | if (!changed) | 214 | if (!changed) |
| 215 | return 0; | 215 | return 0; |
| 216 | return slave_put_val(slave, ucontrol); | 216 | err = slave_put_val(slave, ucontrol); |
| 217 | if (err < 0) | ||
| 218 | return err; | ||
| 219 | return 1; | ||
| 217 | } | 220 | } |
| 218 | 221 | ||
| 219 | static int slave_tlv_cmd(struct snd_kcontrol *kcontrol, | 222 | static int slave_tlv_cmd(struct snd_kcontrol *kcontrol, |
