diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-09-15 02:24:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-15 02:24:53 -0400 |
commit | d4b80afbba49e968623330f1336da8c724da8aad (patch) | |
tree | a9478bd77d8b001a6a7119328d34e9666d7bfe93 /sound/core/rawmidi.c | |
parent | fcd709ef20a9d83bdb7524d27cd6719dac8690a0 (diff) | |
parent | 4cea8776571b18db7485930cb422faa739580c8c (diff) |
Merge branch 'linus' into x86/asm, to pick up recent fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'sound/core/rawmidi.c')
-rw-r--r-- | sound/core/rawmidi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index 795437b10082..b450a27588c8 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c | |||
@@ -1633,11 +1633,13 @@ static int snd_rawmidi_dev_register(struct snd_device *device) | |||
1633 | return -EBUSY; | 1633 | return -EBUSY; |
1634 | } | 1634 | } |
1635 | list_add_tail(&rmidi->list, &snd_rawmidi_devices); | 1635 | list_add_tail(&rmidi->list, &snd_rawmidi_devices); |
1636 | mutex_unlock(®ister_mutex); | ||
1636 | err = snd_register_device(SNDRV_DEVICE_TYPE_RAWMIDI, | 1637 | err = snd_register_device(SNDRV_DEVICE_TYPE_RAWMIDI, |
1637 | rmidi->card, rmidi->device, | 1638 | rmidi->card, rmidi->device, |
1638 | &snd_rawmidi_f_ops, rmidi, &rmidi->dev); | 1639 | &snd_rawmidi_f_ops, rmidi, &rmidi->dev); |
1639 | if (err < 0) { | 1640 | if (err < 0) { |
1640 | rmidi_err(rmidi, "unable to register\n"); | 1641 | rmidi_err(rmidi, "unable to register\n"); |
1642 | mutex_lock(®ister_mutex); | ||
1641 | list_del(&rmidi->list); | 1643 | list_del(&rmidi->list); |
1642 | mutex_unlock(®ister_mutex); | 1644 | mutex_unlock(®ister_mutex); |
1643 | return err; | 1645 | return err; |
@@ -1645,6 +1647,7 @@ static int snd_rawmidi_dev_register(struct snd_device *device) | |||
1645 | if (rmidi->ops && rmidi->ops->dev_register && | 1647 | if (rmidi->ops && rmidi->ops->dev_register && |
1646 | (err = rmidi->ops->dev_register(rmidi)) < 0) { | 1648 | (err = rmidi->ops->dev_register(rmidi)) < 0) { |
1647 | snd_unregister_device(&rmidi->dev); | 1649 | snd_unregister_device(&rmidi->dev); |
1650 | mutex_lock(®ister_mutex); | ||
1648 | list_del(&rmidi->list); | 1651 | list_del(&rmidi->list); |
1649 | mutex_unlock(®ister_mutex); | 1652 | mutex_unlock(®ister_mutex); |
1650 | return err; | 1653 | return err; |
@@ -1677,7 +1680,6 @@ static int snd_rawmidi_dev_register(struct snd_device *device) | |||
1677 | } | 1680 | } |
1678 | } | 1681 | } |
1679 | #endif /* CONFIG_SND_OSSEMUL */ | 1682 | #endif /* CONFIG_SND_OSSEMUL */ |
1680 | mutex_unlock(®ister_mutex); | ||
1681 | sprintf(name, "midi%d", rmidi->device); | 1683 | sprintf(name, "midi%d", rmidi->device); |
1682 | entry = snd_info_create_card_entry(rmidi->card, name, rmidi->card->proc_root); | 1684 | entry = snd_info_create_card_entry(rmidi->card, name, rmidi->card->proc_root); |
1683 | if (entry) { | 1685 | if (entry) { |