diff options
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hidp/core.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 9a562cf7406b..66782010f82c 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -507,12 +507,10 @@ static int hidp_session(void *arg) | |||
507 | 507 | ||
508 | hidp_del_timer(session); | 508 | hidp_del_timer(session); |
509 | 509 | ||
510 | if (intr_sk->sk_state != BT_CONNECTED) | ||
511 | wait_event_timeout(*(ctrl_sk->sk_sleep), (ctrl_sk->sk_state == BT_CLOSED), HZ); | ||
512 | |||
513 | fput(session->intr_sock->file); | 510 | fput(session->intr_sock->file); |
514 | 511 | ||
515 | wait_event_timeout(*(intr_sk->sk_sleep), (intr_sk->sk_state == BT_CLOSED), HZ); | 512 | wait_event_timeout(*(ctrl_sk->sk_sleep), |
513 | (ctrl_sk->sk_state == BT_CLOSED), msecs_to_jiffies(500)); | ||
516 | 514 | ||
517 | fput(session->ctrl_sock->file); | 515 | fput(session->ctrl_sock->file); |
518 | 516 | ||