* [PATCH v2] NFC: microread: Remove redundant assignment to variable err
@ 2021-06-01 13:35 Nigel Christian
2021-06-01 13:41 ` Krzysztof Kozlowski
2021-06-02 0:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Nigel Christian @ 2021-06-01 13:35 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: netdev, kernel-janitors
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 <nigel.l.christian@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] NFC: microread: Remove redundant assignment to variable err
2021-06-01 13:35 [PATCH v2] NFC: microread: Remove redundant assignment to variable err Nigel Christian
@ 2021-06-01 13:41 ` Krzysztof Kozlowski
2021-06-02 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-06-01 13:41 UTC (permalink / raw)
To: Nigel Christian; +Cc: netdev, kernel-janitors
On 01/06/2021 15:35, Nigel Christian wrote:
> 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 <nigel.l.christian@gmail.com>
> ---
> 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);
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] NFC: microread: Remove redundant assignment to variable err
2021-06-01 13:35 [PATCH v2] NFC: microread: Remove redundant assignment to variable err Nigel Christian
2021-06-01 13:41 ` Krzysztof Kozlowski
@ 2021-06-02 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-02 0:10 UTC (permalink / raw)
To: Nigel Christian; +Cc: krzysztof.kozlowski, netdev, kernel-janitors
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Tue, 1 Jun 2021 09:35:33 -0400 you wrote:
> 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 <nigel.l.christian@gmail.com>
>
> [...]
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-02 0:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 13:35 [PATCH v2] NFC: microread: Remove redundant assignment to variable err Nigel Christian
2021-06-01 13:41 ` Krzysztof Kozlowski
2021-06-02 0:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).