diff options
Diffstat (limited to 'drivers/hid/hid-debug.c')
-rw-r--r-- | drivers/hid/hid-debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index c94026768570..850d02a7a925 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c | |||
@@ -949,8 +949,8 @@ static ssize_t hid_debug_events_read(struct file *file, char __user *buffer, | |||
949 | int ret = 0, len; | 949 | int ret = 0, len; |
950 | DECLARE_WAITQUEUE(wait, current); | 950 | DECLARE_WAITQUEUE(wait, current); |
951 | 951 | ||
952 | mutex_lock(&list->read_mutex); | ||
952 | while (ret == 0) { | 953 | while (ret == 0) { |
953 | mutex_lock(&list->read_mutex); | ||
954 | if (list->head == list->tail) { | 954 | if (list->head == list->tail) { |
955 | add_wait_queue(&list->hdev->debug_wait, &wait); | 955 | add_wait_queue(&list->hdev->debug_wait, &wait); |
956 | set_current_state(TASK_INTERRUPTIBLE); | 956 | set_current_state(TASK_INTERRUPTIBLE); |