Skip to content

Commit 7cf85f8

Browse files
Yang Lidavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Yang Li <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 52aa0b1 commit 7cf85f8

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

net/nfc/nci/hci.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,6 @@ static int nci_hci_send_data(struct nci_dev *ndev, u8 pipe,
161161
*(u8 *)skb_push(skb, 1) = data_type;
162162

163163
do {
164-
len = conn_info->max_pkt_payload_len;
165-
166164
/* If last packet add NCI_HFP_NO_CHAINING */
167165
if (i + conn_info->max_pkt_payload_len -
168166
(skb->len + 1) >= data_len) {

0 commit comments

Comments
 (0)