From: Qingfang Deng <qingfang.deng@linux.dev>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
Markus Elfring <elfring@users.sourceforge.net>,
Kees Cook <kees@kernel.org>,
linux-ppp@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: kernel test robot <lkp@intel.com>, Dan Carpenter <error27@gmail.com>
Subject: [PATCH net] ppp_synctty: remove redundant skb null check in ppp_sync_txmunge()
Date: Sun, 20 Sep 2026 19:49:43 +0800 [thread overview]
Message-ID: <20260920114945.2517-1-qingfang.deng@linux.dev> (raw)
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.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202609132245.txZXoUxc-lkp@intel.com/
Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
---
drivers/net/ppp/ppp_synctty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ppp/ppp_synctty.c b/drivers/net/ppp/ppp_synctty.c
index 9e440e110e9f..b90ae0583c84 100644
--- a/drivers/net/ppp/ppp_synctty.c
+++ b/drivers/net/ppp/ppp_synctty.c
@@ -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;
--
2.34.1
next reply other threads:[~2026-09-20 11:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 11:49 Qingfang Deng [this message]
2026-09-23 23:50 ` [PATCH net] ppp_synctty: remove redundant skb null check in ppp_sync_txmunge() patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260920114945.2517-1-qingfang.deng@linux.dev \
--to=qingfang.deng@linux.dev \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=elfring@users.sourceforge.net \
--cc=error27@gmail.com \
--cc=jirislaby@kernel.org \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ppp@vger.kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.