diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-03-18 06:04:42 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-03-18 06:04:42 -0400 |
commit | cf30f46acde1f84fbf603bba6540cbb40cc6c954 (patch) | |
tree | 2652b3fd1fbc4c379ee5325579fe60eae75421f1 /sound/core | |
parent | 0959f22ee66734c212fc733f7616ba321ef7f47f (diff) | |
parent | a86b1a2cd2f81f74e815e07f756edd7bc5b6f034 (diff) |
Merge branch 'for-linus' into for-next
Back-merged for refactoring beep stuff.
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/seq/oss/seq_oss_event.c | 14 | ||||
-rw-r--r-- | sound/core/seq/seq_timer.c | 8 | ||||
-rw-r--r-- | sound/core/vmaster.c | 5 |
3 files changed, 20 insertions, 7 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/seq/seq_timer.c b/sound/core/seq/seq_timer.c index 160b1bd0cd62..24d44b2f61ac 100644 --- a/sound/core/seq/seq_timer.c +++ b/sound/core/seq/seq_timer.c | |||
@@ -290,10 +290,10 @@ int snd_seq_timer_open(struct snd_seq_queue *q) | |||
290 | tid.device = SNDRV_TIMER_GLOBAL_SYSTEM; | 290 | tid.device = SNDRV_TIMER_GLOBAL_SYSTEM; |
291 | err = snd_timer_open(&t, str, &tid, q->queue); | 291 | err = snd_timer_open(&t, str, &tid, q->queue); |
292 | } | 292 | } |
293 | if (err < 0) { | 293 | } |
294 | snd_printk(KERN_ERR "seq fatal error: cannot create timer (%i)\n", err); | 294 | if (err < 0) { |
295 | return err; | 295 | snd_printk(KERN_ERR "seq fatal error: cannot create timer (%i)\n", err); |
296 | } | 296 | return err; |
297 | } | 297 | } |
298 | t->callback = snd_seq_timer_interrupt; | 298 | t->callback = snd_seq_timer_interrupt; |
299 | t->callback_data = q; | 299 | t->callback_data = q; |
diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c index 55c9d8c8d3c1..02f90b4f8b86 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, |