diff options
Diffstat (limited to 'net/bluetooth/af_bluetooth.c')
-rw-r--r-- | net/bluetooth/af_bluetooth.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index f6a1671ea2ff..56ca494621c6 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
@@ -224,10 +224,9 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
224 | 224 | ||
225 | skb = skb_recv_datagram(sk, flags, noblock, &err); | 225 | skb = skb_recv_datagram(sk, flags, noblock, &err); |
226 | if (!skb) { | 226 | if (!skb) { |
227 | if (sk->sk_shutdown & RCV_SHUTDOWN) { | 227 | if (sk->sk_shutdown & RCV_SHUTDOWN) |
228 | msg->msg_namelen = 0; | ||
229 | return 0; | 228 | return 0; |
230 | } | 229 | |
231 | return err; | 230 | return err; |
232 | } | 231 | } |
233 | 232 | ||
@@ -245,8 +244,6 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
245 | if (bt_sk(sk)->skb_msg_name) | 244 | if (bt_sk(sk)->skb_msg_name) |
246 | bt_sk(sk)->skb_msg_name(skb, msg->msg_name, | 245 | bt_sk(sk)->skb_msg_name(skb, msg->msg_name, |
247 | &msg->msg_namelen); | 246 | &msg->msg_namelen); |
248 | else | ||
249 | msg->msg_namelen = 0; | ||
250 | } | 247 | } |
251 | 248 | ||
252 | skb_free_datagram(sk, skb); | 249 | skb_free_datagram(sk, skb); |
@@ -295,8 +292,6 @@ int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
295 | if (flags & MSG_OOB) | 292 | if (flags & MSG_OOB) |
296 | return -EOPNOTSUPP; | 293 | return -EOPNOTSUPP; |
297 | 294 | ||
298 | msg->msg_namelen = 0; | ||
299 | |||
300 | BT_DBG("sk %p size %zu", sk, size); | 295 | BT_DBG("sk %p size %zu", sk, size); |
301 | 296 | ||
302 | lock_sock(sk); | 297 | lock_sock(sk); |