mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
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 <efremov@linux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
abbf9a0ef8
commit
85554bcd12
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user