aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/af_bluetooth.c
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-25 03:56:13 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-25 03:56:13 +0100
commit795ad0819be4d5922b5140bdda6ff9d0368b0512 (patch)
treee96992a37b3ebc611b7de7a745f28237ecf7a365 /net/bluetooth/af_bluetooth.c
parent549367162dfdc75d573f74f4e2891f2dba41582f (diff)
downloadkernel_samsung_smdk4412-795ad0819be4d5922b5140bdda6ff9d0368b0512.zip
kernel_samsung_smdk4412-795ad0819be4d5922b5140bdda6ff9d0368b0512.tar.gz
kernel_samsung_smdk4412-795ad0819be4d5922b5140bdda6ff9d0368b0512.tar.bz2
first merge of networking with upstream
Diffstat (limited to 'net/bluetooth/af_bluetooth.c')
-rw-r--r--net/bluetooth/af_bluetooth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 9047512..8ea4963 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -532,8 +532,9 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
BT_DBG("sk %p", sk);
add_wait_queue(sk_sleep(sk), &wait);
- set_current_state(TASK_INTERRUPTIBLE);
while (sk->sk_state != state) {
+ set_current_state(TASK_INTERRUPTIBLE);
+
if (!timeo) {
err = -EINPROGRESS;
break;
@@ -547,13 +548,12 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
release_sock(sk);
timeo = schedule_timeout(timeo);
lock_sock(sk);
- set_current_state(TASK_INTERRUPTIBLE);
err = sock_error(sk);
if (err)
break;
}
- __set_current_state(TASK_RUNNING);
+ set_current_state(TASK_RUNNING);
remove_wait_queue(sk_sleep(sk), &wait);
return err;
}