aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/af_bluetooth.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index ded57974390e..02b9baa1930b 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -270,12 +270,11 @@ static inline unsigned int bt_accept_poll(struct sock *parent)
270 struct list_head *p, *n; 270 struct list_head *p, *n;
271 struct sock *sk; 271 struct sock *sk;
272 272
273 if (bt_sk(parent)->defer_setup)
274 return POLLIN | POLLRDNORM;
275
276 list_for_each_safe(p, n, &bt_sk(parent)->accept_q) { 273 list_for_each_safe(p, n, &bt_sk(parent)->accept_q) {
277 sk = (struct sock *) list_entry(p, struct bt_sock, accept_q); 274 sk = (struct sock *) list_entry(p, struct bt_sock, accept_q);
278 if (sk->sk_state == BT_CONNECTED) 275 if (sk->sk_state == BT_CONNECTED ||
276 (bt_sk(parent)->defer_setup &&
277 sk->sk_state == BT_CONNECT2))
279 return POLLIN | POLLRDNORM; 278 return POLLIN | POLLRDNORM;
280 } 279 }
281 280