aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/llcp/sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/nfc/llcp/sock.c')
-rw-r--r--net/nfc/llcp/sock.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c
index b8bef367ee49..d3861773fab0 100644
--- a/net/nfc/llcp/sock.c
+++ b/net/nfc/llcp/sock.c
@@ -327,20 +327,10 @@ static int llcp_sock_release(struct socket *sock)
327 327
328 mutex_lock(&local->socket_lock); 328 mutex_lock(&local->socket_lock);
329 329
330 if (llcp_sock == local->sockets[llcp_sock->ssap]) { 330 if (llcp_sock == local->sockets[llcp_sock->ssap])
331 local->sockets[llcp_sock->ssap] = NULL; 331 local->sockets[llcp_sock->ssap] = NULL;
332 } else { 332 else
333 struct nfc_llcp_sock *parent, *s, *n; 333 list_del(&llcp_sock->list);
334
335 parent = local->sockets[llcp_sock->ssap];
336
337 list_for_each_entry_safe(s, n, &parent->list, list)
338 if (llcp_sock == s) {
339 list_del(&s->list);
340 break;
341 }
342
343 }
344 334
345 mutex_unlock(&local->socket_lock); 335 mutex_unlock(&local->socket_lock);
346 336