net: x25: drop harmless check of !more
authorJean Sacren <sakiwit@gmail.com>
Wed, 8 Dec 2021 07:20:25 +0000 (00:20 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Dec 2021 02:35:11 +0000 (18:35 -0800)
'more' is checked first.  When !more is checked immediately after that,
it is always true.  We should drop this check.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Acked-by: Martin Schiller <ms@dev.tdt.de>
Link: https://lore.kernel.org/r/20211208024732.142541-5-sakiwit@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/x25/x25_in.c

index e1c4197..b981a48 100644 (file)
@@ -41,7 +41,7 @@ static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)
                return 0;
        }
 
-       if (!more && x25->fraglen > 0) {        /* End of fragment */
+       if (x25->fraglen > 0) { /* End of fragment */
                int len = x25->fraglen + skb->len;
 
                if ((skbn = alloc_skb(len, GFP_ATOMIC)) == NULL){