Thread (3 messages) flat view 3 messages, 3 authors, 2021-06-02
STALE1931d

[PATCH v2] NFC: microread: Remove redundant assignment to variable err

From: Nigel Christian <hidden>
Date: 2021-06-01 13:35:40
Also in: kernel-janitors
Subsystem: nfc subsystem, the rest · Maintainers: David Heidelberg, Linus Torvalds

In the case MICROREAD_CB_TYPE_READER_ALL clang reports a dead code
warning. The error code assigned to variable err is already passed
to async_cb(). The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Nigel Christian <redacted>
---
 drivers/nfc/microread/microread.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/nfc/microread/microread.c b/drivers/nfc/microread/microread.c
index 8d3988457c58..b1d3975e8a81 100644
--- a/drivers/nfc/microread/microread.c
+++ b/drivers/nfc/microread/microread.c
@@ -364,7 +364,6 @@ static void microread_im_transceive_cb(void *context, struct sk_buff *skb,
 	case MICROREAD_CB_TYPE_READER_ALL:
 		if (err == 0) {
 			if (skb->len == 0) {
-				err = -EPROTO;
 				kfree_skb(skb);
 				info->async_cb(info->async_cb_context, NULL,
 					       -EPROTO);
-- 
2.31.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help