From: Denis Efremov Date: Fri, 5 Mar 2021 16:26:22 +0000 (+0300) Subject: net/hamradio/6pack: remove redundant check in sp_encaps() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=85554bcd123e307282631defe6bf6fac5031cf60;p=linux.git net/hamradio/6pack: remove redundant check in sp_encaps() "len > sp->mtu" checked twice in a row in sp_encaps(). Remove the second check. Signed-off-by: Denis Efremov Signed-off-by: David S. Miller --- diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 71d6629e65c97..9f5b5614a1503 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c @@ -171,11 +171,6 @@ static void sp_encaps(struct sixpack *sp, unsigned char *icp, int len) goto out_drop; } - if (len > sp->mtu) { /* sp->mtu = AX25_MTU = max. PACLEN = 256 */ - msg = "oversized transmit packet!"; - goto out_drop; - } - if (p[0] > 5) { msg = "invalid KISS command"; goto out_drop;