summaryrefslogtreecommitdiff
path: root/drivers/nfc
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2021-12-30 16:12:30 +0000
committerJakub Kicinski <kuba@kernel.org>2021-12-30 17:26:58 -0800
commit314fbde95769e0cff68ef74ccc261935bb0c6852 (patch)
treed92f70f95dac961d6f6713b17ef7f3afcd4f5040 /drivers/nfc
parentaec53e60e0e665b359328b946654bc3ef77aed57 (diff)
downloadlinux-rpi-314fbde95769e0cff68ef74ccc261935bb0c6852.tar.gz
linux-rpi-314fbde95769e0cff68ef74ccc261935bb0c6852.tar.bz2
linux-rpi-314fbde95769e0cff68ef74ccc261935bb0c6852.zip
nfc: st21nfca: remove redundant assignment to variable i
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>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/st21nfca/i2c.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c
index 35b32fb90906..a86b5edfc7ce 100644
--- a/drivers/nfc/st21nfca/i2c.c
+++ b/drivers/nfc/st21nfca/i2c.c
@@ -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);