diff options
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hidp/core.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index ceadfcf457c1..450eb0244bbf 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -581,15 +581,6 @@ static int hidp_session(void *arg) | |||
581 | 581 | ||
582 | hidp_del_timer(session); | 582 | hidp_del_timer(session); |
583 | 583 | ||
584 | fput(session->intr_sock->file); | ||
585 | |||
586 | wait_event_timeout(*(ctrl_sk->sk_sleep), | ||
587 | (ctrl_sk->sk_state == BT_CLOSED), msecs_to_jiffies(500)); | ||
588 | |||
589 | fput(session->ctrl_sock->file); | ||
590 | |||
591 | __hidp_unlink_session(session); | ||
592 | |||
593 | if (session->input) { | 584 | if (session->input) { |
594 | input_unregister_device(session->input); | 585 | input_unregister_device(session->input); |
595 | session->input = NULL; | 586 | session->input = NULL; |
@@ -601,6 +592,15 @@ static int hidp_session(void *arg) | |||
601 | hid_free_device(session->hid); | 592 | hid_free_device(session->hid); |
602 | } | 593 | } |
603 | 594 | ||
595 | fput(session->intr_sock->file); | ||
596 | |||
597 | wait_event_timeout(*(ctrl_sk->sk_sleep), | ||
598 | (ctrl_sk->sk_state == BT_CLOSED), msecs_to_jiffies(500)); | ||
599 | |||
600 | fput(session->ctrl_sock->file); | ||
601 | |||
602 | __hidp_unlink_session(session); | ||
603 | |||
604 | up_write(&hidp_session_sem); | 604 | up_write(&hidp_session_sem); |
605 | 605 | ||
606 | kfree(session); | 606 | kfree(session); |