diff options
author | David S. Miller <davem@davemloft.net> | 2022-03-03 10:43:37 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-03-03 10:43:37 +0000 |
commit | ef132dc40a28e07ba10b707b505781ffca46b97f (patch) | |
tree | f25b8c831867529c09c72c472d67e6d75b1ccc6a /net/nfc/llcp_core.c | |
parent | ca0a53dcec9495d1dc5bbc369c810c520d728373 (diff) | |
parent | 44cd5765495b30bc2527463f4a4b8c028e11535b (diff) | |
download | linux-ef132dc40a28e07ba10b707b505781ffca46b97f.tar.gz linux-ef132dc40a28e07ba10b707b505781ffca46b97f.tar.bz2 linux-ef132dc40a28e07ba10b707b505781ffca46b97f.zip |
Merge branch 'nfc-llcp-cleanups'
Krzysztof Kozlowski says:
====================
nfc: llcp: few cleanups/improvements
These are improvements, not fixing any experienced issue, just looking correct
to me from the code point of view.
Changes since v1
================
1. Split from the fix.
Testing
=======
Under QEMU only. The NFC/LLCP code was not really tested on a device.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/nfc/llcp_core.c')
-rw-r--r-- | net/nfc/llcp_core.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c index 5ad5157aa9c5..3364caabef8b 100644 --- a/net/nfc/llcp_core.c +++ b/net/nfc/llcp_core.c @@ -383,7 +383,7 @@ u8 nfc_llcp_get_sdp_ssap(struct nfc_llcp_local *local, pr_debug("WKS %d\n", ssap); /* This is a WKS, let's check if it's free */ - if (local->local_wks & BIT(ssap)) { + if (test_bit(ssap, &local->local_wks)) { mutex_unlock(&local->sdp_lock); return LLCP_SAP_MAX; @@ -737,13 +737,6 @@ static void nfc_llcp_tx_work(struct work_struct *work) print_hex_dump_debug("LLCP Tx: ", DUMP_PREFIX_OFFSET, 16, 1, skb->data, skb->len, true); - if (ptype == LLCP_PDU_DISC && sk != NULL && - sk->sk_state == LLCP_DISCONNECTING) { - nfc_llcp_sock_unlink(&local->sockets, sk); - sock_orphan(sk); - sock_put(sk); - } - if (ptype == LLCP_PDU_I) copy_skb = skb_copy(skb, GFP_ATOMIC); |