diff options
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r-- | net/bluetooth/l2cap.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 99d68c34e4f1..864c76f4a678 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -1147,7 +1147,7 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int fl | |||
1147 | BT_DBG("sk %p timeo %ld", sk, timeo); | 1147 | BT_DBG("sk %p timeo %ld", sk, timeo); |
1148 | 1148 | ||
1149 | /* Wait for an incoming connection. (wake-one). */ | 1149 | /* Wait for an incoming connection. (wake-one). */ |
1150 | add_wait_queue_exclusive(sk->sk_sleep, &wait); | 1150 | add_wait_queue_exclusive(sk_sleep(sk), &wait); |
1151 | while (!(nsk = bt_accept_dequeue(sk, newsock))) { | 1151 | while (!(nsk = bt_accept_dequeue(sk, newsock))) { |
1152 | set_current_state(TASK_INTERRUPTIBLE); | 1152 | set_current_state(TASK_INTERRUPTIBLE); |
1153 | if (!timeo) { | 1153 | if (!timeo) { |
@@ -1170,7 +1170,7 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int fl | |||
1170 | } | 1170 | } |
1171 | } | 1171 | } |
1172 | set_current_state(TASK_RUNNING); | 1172 | set_current_state(TASK_RUNNING); |
1173 | remove_wait_queue(sk->sk_sleep, &wait); | 1173 | remove_wait_queue(sk_sleep(sk), &wait); |
1174 | 1174 | ||
1175 | if (err) | 1175 | if (err) |
1176 | goto done; | 1176 | goto done; |
@@ -1626,7 +1626,10 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms | |||
1626 | /* Connectionless channel */ | 1626 | /* Connectionless channel */ |
1627 | if (sk->sk_type == SOCK_DGRAM) { | 1627 | if (sk->sk_type == SOCK_DGRAM) { |
1628 | skb = l2cap_create_connless_pdu(sk, msg, len); | 1628 | skb = l2cap_create_connless_pdu(sk, msg, len); |
1629 | err = l2cap_do_send(sk, skb); | 1629 | if (IS_ERR(skb)) |
1630 | err = PTR_ERR(skb); | ||
1631 | else | ||
1632 | err = l2cap_do_send(sk, skb); | ||
1630 | goto done; | 1633 | goto done; |
1631 | } | 1634 | } |
1632 | 1635 | ||