NFC: microread: Remove redundant assignment to variable err
Subsystems (4)
PATCH v2 1/1 NFC: microread: Remove redundant assignment to variable err
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")
--- drivers/nfc/microread/microread.c | 1 - 1 file changed, 1 deletion(-)
drivers/nfc/microread/microread.c +0 -1
@@ -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 );
Signature · 1 line
2.31.1
Quoted 16 lines · Nigel Christian
In the case
MICROREAD_CB_TYPE_READER_ALLclang reports a dead code warning. The error code assigned to variable err is already passed toasync_cb(). The assignment is redundant and can be removed.Addresses-Coverity: ("Unused value")
Signed-off-by Nigel Christian <[email protected]>--- drivers/nfc/microread/microread.c | 1 - 1 file changed, 1 deletion(-)drivers/nfc/microread/microread.c +0
-0
drivers/nfc/microread/microread.c static void microread_im_transceive_cb(void *context, struct sk_buff *skb, · line 369
Quoted 7 lines
drivers/nfc/microread/microread.c +0
-1@@ -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 );
Best regards,
Krzysztof
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 8 lines · On Tue, 1 Jun 2021 09:35:33 -0400 you wrote:
In the case
MICROREAD_CB_TYPE_READER_ALLclang reports a dead code warning. The error code assigned to variable err is already passed toasync_cb(). The assignment is redundant and can be removed.Addresses-Coverity: ("Unused value")
Signed-off-by Nigel Christian <[email protected]>[...]
Here is the summary with links:
- [v2] NFC: microread: Remove redundant assignment to variable err
https://git.kernel.org/netdev/net-next/c/e5432cc71ab6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html