diff options
Diffstat (limited to 'drivers/firewire/fw-cdev.c')
-rw-r--r-- | drivers/firewire/fw-cdev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c index a320ab48edd6..4dd66c1a36da 100644 --- a/drivers/firewire/fw-cdev.c +++ b/drivers/firewire/fw-cdev.c | |||
@@ -1009,6 +1009,10 @@ static int fw_device_op_release(struct inode *inode, struct file *file) | |||
1009 | struct event *e, *next_e; | 1009 | struct event *e, *next_e; |
1010 | struct client_resource *r, *next_r; | 1010 | struct client_resource *r, *next_r; |
1011 | 1011 | ||
1012 | mutex_lock(&client->device->client_list_mutex); | ||
1013 | list_del(&client->link); | ||
1014 | mutex_unlock(&client->device->client_list_mutex); | ||
1015 | |||
1012 | if (client->buffer.pages) | 1016 | if (client->buffer.pages) |
1013 | fw_iso_buffer_destroy(&client->buffer, client->device->card); | 1017 | fw_iso_buffer_destroy(&client->buffer, client->device->card); |
1014 | 1018 | ||
@@ -1026,10 +1030,6 @@ static int fw_device_op_release(struct inode *inode, struct file *file) | |||
1026 | list_for_each_entry_safe(e, next_e, &client->event_list, link) | 1030 | list_for_each_entry_safe(e, next_e, &client->event_list, link) |
1027 | kfree(e); | 1031 | kfree(e); |
1028 | 1032 | ||
1029 | mutex_lock(&client->device->client_list_mutex); | ||
1030 | list_del(&client->link); | ||
1031 | mutex_unlock(&client->device->client_list_mutex); | ||
1032 | |||
1033 | fw_device_put(client->device); | 1033 | fw_device_put(client->device); |
1034 | kfree(client); | 1034 | kfree(client); |
1035 | 1035 | ||