Commit 5a0f6f3b authored by Samuel Ortiz's avatar Samuel Ortiz
Browse files

NFC: Don't hold a NULL connecting LLCP socket lock


Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent dadb06f2
......@@ -477,8 +477,10 @@ static struct nfc_llcp_sock *nfc_llcp_connecting_sock_get(struct nfc_llcp_local
sk_for_each(sk, node, &local->connecting_sockets.head) {
llcp_sock = nfc_llcp_sock(sk);
if (llcp_sock->ssap == ssap)
if (llcp_sock->ssap == ssap) {
sock_hold(&llcp_sock->sk);
goto out;
}
}
llcp_sock = NULL;
......@@ -486,8 +488,6 @@ static struct nfc_llcp_sock *nfc_llcp_connecting_sock_get(struct nfc_llcp_local
out:
read_unlock(&local->connecting_sockets.lock);
sock_hold(&llcp_sock->sk);
return llcp_sock;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment