Skip to contentSkip to conversation

net/hamradio/6pack: remove redundant check in sp_encaps()

PATCH Applied Denis Efremov 2 participants 2 messages Mar 5, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/hamradio/6pack: remove redundant check in sp_encaps()

"len > sp->mtu" checked twice in a row in sp_encaps(). Remove the second check.

---
 drivers/net/hamradio/6pack.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/net/hamradio/6pack.c +0 -5
index 71d6629e65c9..9f5b5614a150 100644
@@ -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;
Signature · 1 line
2.26.2
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 7 lines · On Fri, 5 Mar 2021 19:26:22 +0300 you wrote:

"len > sp->mtu" checked twice in a row in sp_encaps(). Remove the second check.

---
 drivers/net/hamradio/6pack.c | 5 -----
 1 file changed, 5 deletions(-)

Here is the summary with links:
- net/hamradio/6pack: remove redundant check in sp_encaps()

    https://git.kernel.org/netdev/net/c/85554bcd123e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html