aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq/seq_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/seq/seq_device.c')
-rw-r--r--sound/core/seq/seq_device.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c
index a8e2c6016800..0631bdadd12b 100644
--- a/sound/core/seq/seq_device.c
+++ b/sound/core/seq/seq_device.c
@@ -360,16 +360,12 @@ int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry,
360 entry->init_device == NULL || entry->free_device == NULL) 360 entry->init_device == NULL || entry->free_device == NULL)
361 return -EINVAL; 361 return -EINVAL;
362 362
363 snd_seq_autoload_lock();
364 ops = find_driver(id, 1); 363 ops = find_driver(id, 1);
365 if (ops == NULL) { 364 if (ops == NULL)
366 snd_seq_autoload_unlock();
367 return -ENOMEM; 365 return -ENOMEM;
368 }
369 if (ops->driver & DRIVER_LOADED) { 366 if (ops->driver & DRIVER_LOADED) {
370 pr_warn("ALSA: seq: driver_register: driver '%s' already exists\n", id); 367 pr_warn("ALSA: seq: driver_register: driver '%s' already exists\n", id);
371 unlock_driver(ops); 368 unlock_driver(ops);
372 snd_seq_autoload_unlock();
373 return -EBUSY; 369 return -EBUSY;
374 } 370 }
375 371
@@ -386,7 +382,6 @@ int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry,
386 mutex_unlock(&ops->reg_mutex); 382 mutex_unlock(&ops->reg_mutex);
387 383
388 unlock_driver(ops); 384 unlock_driver(ops);
389 snd_seq_autoload_unlock();
390 385
391 return 0; 386 return 0;
392} 387}