NFC: microread: Remove redundant assignment to variable err
authorNigel Christian <nigel.l.christian@gmail.com>
Tue, 1 Jun 2021 13:35:33 +0000 (09:35 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Jun 2021 23:58:38 +0000 (16:58 -0700)
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>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/nfc/microread/microread.c

index 8d3988457c58126e83f939a34d88d5c9e48423d9..b1d3975e8a81cabd689d45eb630585ae21e972af 100644 (file)
@@ -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);