Skip to content

Commit

Permalink
NFC: nci: Remove redundant assignment to len
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Yang Li <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Yang Li authored and davem330 committed Jun 1, 2021
1 parent 52aa0b1 commit 7cf85f8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/nfc/nci/hci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7cf85f8

Please sign in to comment.