if (err < 0)
return err;
- if (mutex_lock_interruptible(®ister_mutex))
- return -ERESTARTSYS;
+ mutex_lock(®ister_mutex);
client = seq_create_client1(-1, SNDRV_SEQ_DEFAULT_EVENTS);
- if (client == NULL) {
+ if (!client) {
mutex_unlock(®ister_mutex);
return -ENOMEM; /* failure code */
}
if (queue == NULL)
return -EINVAL;
- if (mutex_lock_interruptible(&queue->timer_mutex)) {
- queuefree(queue);
- return -ERESTARTSYS;
- }
+ mutex_lock(&queue->timer_mutex);
tmr = queue->timer;
memset(timer, 0, sizeof(*timer));
timer->queue = queue->queue;
q = queueptr(timer->queue);
if (q == NULL)
return -ENXIO;
- if (mutex_lock_interruptible(&q->timer_mutex)) {
- queuefree(q);
- return -ERESTARTSYS;
- }
+ mutex_lock(&q->timer_mutex);
tmr = q->timer;
snd_seq_queue_timer_close(timer->queue);
tmr->type = timer->type;
if (card == NULL && client_index >= SNDRV_SEQ_GLOBAL_CLIENTS)
return -EINVAL;
- if (mutex_lock_interruptible(®ister_mutex))
- return -ERESTARTSYS;
+ mutex_lock(®ister_mutex);
if (card) {
client_index += SNDRV_SEQ_GLOBAL_CLIENTS
snd_device_initialize(&seq_dev, NULL);
dev_set_name(&seq_dev, "seq");
- if (mutex_lock_interruptible(®ister_mutex))
- return -ERESTARTSYS;
-
+ mutex_lock(®ister_mutex);
err = snd_register_device(SNDRV_DEVICE_TYPE_SEQUENCER, NULL, 0,
&snd_seq_f_ops, NULL, &seq_dev);
+ mutex_unlock(®ister_mutex);
if (err < 0) {
- mutex_unlock(®ister_mutex);
put_device(&seq_dev);
return err;
}
- mutex_unlock(®ister_mutex);
-
return 0;
}