From: Nigel Christian Date: Tue, 1 Jun 2021 13:35:33 +0000 (-0400) Subject: NFC: microread: Remove redundant assignment to variable err X-Git-Tag: v5.14-rc1~119^2~387 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e5432cc71ab64b10100a290b7bf32804981c9cb4;p=thirdparty%2Fkernel%2Flinux.git 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") Signed-off-by: Nigel Christian Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller --- diff --git a/drivers/nfc/microread/microread.c b/drivers/nfc/microread/microread.c index 8d3988457c581..b1d3975e8a81c 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);