net: caif: remove redundant assignment to variable expectlen
authorColin Ian King <colin.i.king@gmail.com>
Tue, 28 Dec 2021 00:45:42 +0000 (00:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Dec 2021 12:52:24 +0000 (12:52 +0000)
Variable expectlen is being assigned a value that is never read, the
assignment occurs before a return statement. The assignment is
redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/cfserl.c

index 40cd57a..aee11c7 100644 (file)
@@ -128,7 +128,6 @@ static int cfserl_receive(struct cflayer *l, struct cfpkt *newpkt)
                                if (pkt != NULL)
                                        cfpkt_destroy(pkt);
                                layr->incomplete_frm = NULL;
-                               expectlen = 0;
                                spin_unlock(&layr->sync);
                                return -EPROTO;
                        }