提交 85554bcd 编写于 作者: D Denis Efremov 提交者: David S. Miller

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: NDenis Efremov <efremov@linux.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 abbf9a0e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册