Skip to contentSkip to conversation

ppp_synctty: remove redundant skb null check in ppp_sync_txmunge()

PATCH Applied Qingfang Deng 2 participants 2 messages Sep 20 – Sep 23

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

PATCH 1/1 ppp_synctty: remove redundant skb null check in ppp_sync_txmunge()

The skb is already dereferenced before the check. In addition, a TX skb passed from the generic layer can never be null.

Remove the redundant null check.

---
 drivers/net/ppp/ppp_synctty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ppp/ppp_synctty.c +1 -1
index 9e440e110e9f..b90ae0583c84 100644
@@ -464,7 +464,7 @@ ppp_sync_txmunge(struct syncppp *ap, struct sk_buff *skb)
 
 	ap->last_xmit = jiffies;
 
-	if (skb && ap->flags & SC_LOG_OUTPKT)
+	if (ap->flags & SC_LOG_OUTPKT)
 		ppp_print_buffer ("send buffer", skb->data, skb->len);
 
 	return skb;
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 5 lines · On Sun, 20 Sep 2026 19:49:43 +0800 you wrote:

The skb is already dereferenced before the check. In addition, a TX skb passed from the generic layer can never be null.

Remove the redundant null check.

Quoted 7 lines

[...]

Here is the summary with links:
- [net] ppp_synctty: remove redundant skb null check in ppp_sync_txmunge()

    https://git.kernel.org/netdev/net-next/c/1196e46f6d42

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html