diff options
| -rw-r--r-- | sound/core/seq/oss/seq_oss_synth.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c index cd0e0ebbfdb1..9e2b250ae780 100644 --- a/sound/core/seq/oss/seq_oss_synth.c +++ b/sound/core/seq/oss/seq_oss_synth.c | |||
| @@ -363,10 +363,14 @@ get_synthdev(struct seq_oss_devinfo *dp, int dev) | |||
| 363 | return NULL; | 363 | return NULL; |
| 364 | if (! dp->synths[dev].opened) | 364 | if (! dp->synths[dev].opened) |
| 365 | return NULL; | 365 | return NULL; |
| 366 | if (dp->synths[dev].is_midi) | 366 | if (dp->synths[dev].is_midi) { |
| 367 | return &midi_synth_dev; | 367 | rec = &midi_synth_dev; |
| 368 | if ((rec = get_sdev(dev)) == NULL) | 368 | snd_use_lock_use(&rec->use_lock); |
| 369 | return NULL; | 369 | } else { |
| 370 | rec = get_sdev(dev); | ||
| 371 | if (!rec) | ||
| 372 | return NULL; | ||
| 373 | } | ||
| 370 | if (! rec->opened) { | 374 | if (! rec->opened) { |
| 371 | snd_use_lock_free(&rec->use_lock); | 375 | snd_use_lock_free(&rec->use_lock); |
| 372 | return NULL; | 376 | return NULL; |
