提交 5a0f6f3b 编写于 作者: S Samuel Ortiz

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

Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册