diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2012-05-21 09:44:42 (GMT) |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-06-04 19:34:31 (GMT) |
commit | 5a0f6f3b46b28310262ad9585b80062ef56c5362 (patch) | |
tree | 65c3c0328b8cebb4f9842127ae875b2f96c54cb1 /net | |
parent | dadb06f270ad7cd9572b82995f6261f8ca4620ac (diff) | |
download | linux-fsl-qoriq-5a0f6f3b46b28310262ad9585b80062ef56c5362.tar.xz |
NFC: Don't hold a NULL connecting LLCP socket lock
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/nfc/llcp/llcp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c index 5705e6d..b694313 100644 --- a/net/nfc/llcp/llcp.c +++ b/net/nfc/llcp/llcp.c @@ -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; } |