diff options
author | Yang Li <yang.lee@linux.alibaba.com> | 2021-06-01 11:49:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-02 00:52:24 +0200 |
commit | 7cf85f8caa042db0e33d70dbd72d8b92b1051f93 (patch) | |
tree | eedc36932e41f9118ebc2fffde36d372dd15e034 /net/nfc | |
parent | net: vxge: Declare the function vxge_reset_all_vpaths as void (diff) | |
download | linux-7cf85f8caa042db0e33d70dbd72d8b92b1051f93.tar.xz linux-7cf85f8caa042db0e33d70dbd72d8b92b1051f93.zip |
NFC: nci: Remove redundant assignment to len
Variable 'len' is set to conn_info->max_pkt_payload_len but this
value is never read as it is overwritten with a new value later on,
hence it is a redundant assignment and can be removed.
Clean up the following clang-analyzer warning:
net/nfc/nci/hci.c:164:3: warning: Value stored to 'len' is never read
[clang-analyzer-deadcode.DeadStores]
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/nci/hci.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index 96865142104f..d6732e5e8958 100644 --- a/net/nfc/nci/hci.c +++ b/net/nfc/nci/hci.c @@ -161,8 +161,6 @@ static int nci_hci_send_data(struct nci_dev *ndev, u8 pipe, *(u8 *)skb_push(skb, 1) = data_type; do { - len = conn_info->max_pkt_payload_len; - /* If last packet add NCI_HFP_NO_CHAINING */ if (i + conn_info->max_pkt_payload_len - (skb->len + 1) >= data_len) { |