netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Nigel Christian <nigel.l.christian@gmail.com>
Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2] NFC: microread: Remove redundant assignment to variable err
Date: Tue, 1 Jun 2021 15:41:44 +0200	[thread overview]
Message-ID: <e58ddaa5-1bc1-dba9-a038-06022e65da59@canonical.com> (raw)
In-Reply-To: <YLY3pSMrpbQxIJxO@fedora>

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

  reply	other threads:[~2021-06-01 13:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 13:35 [PATCH v2] NFC: microread: Remove redundant assignment to variable err Nigel Christian
2021-06-01 13:41 ` Krzysztof Kozlowski [this message]
2021-06-02  0:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e58ddaa5-1bc1-dba9-a038-06022e65da59@canonical.com \
    --to=krzysztof.kozlowski@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nigel.l.christian@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).