Skip to content

Commit

Permalink
nfc: st21nfca: remove redundant assignment to variable i
Browse files Browse the repository at this point in the history
Variable i is being assigned a value that is never read, the
assignment is redundant and can be removed. Cleans up clang-scan
build warning:

drivers/nfc/st21nfca/i2c.c:319:4: warning: Value stored to 'i'
is never read [deadcode.DeadStores]
                        i = 0;

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20211230161230.428457-1-colin.i.king@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Colin Ian King authored and Jakub Kicinski committed Dec 31, 2021
1 parent aec53e6 commit 314fbde
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/nfc/st21nfca/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,8 @@ static int st21nfca_hci_i2c_repack(struct sk_buff *skb)
skb_pull(skb, 1);

r = check_crc(skb->data, skb->len);
if (r != 0) {
i = 0;
if (r != 0)
return -EBADMSG;
}

/* remove headbyte */
skb_pull(skb, 1);
Expand Down

0 comments on commit 314fbde

Please sign in to comment.