summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorTom Parkin <tparkin@katalix.com>2020-07-24 18:31:51 +0300
committerDavid S. Miller <davem@davemloft.net>2020-07-25 03:19:14 +0300
commitce2f86ae253de3f3e961d4f91438604a97c29752 (patch)
treeba9e343a7de10b6767cd855576e5ad8c7d3d5b31 /net
parent7a379558c28c435681221aa5d84ead8ff19211be (diff)
downloadlinux-ce2f86ae253de3f3e961d4f91438604a97c29752.tar.xz
l2tp: remove BUG_ON in l2tp_session_queue_purge
l2tp_session_queue_purge is only called from l2tp_core.c, and it's easy to statically analyse the code paths calling it to validate that it should never be passed a NULL session pointer. Having a BUG_ON checking the session pointer triggers a checkpatch warning. Since the BUG_ON is of no value, remove it to avoid the warning. Signed-off-by: Tom Parkin <tparkin@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/l2tp/l2tp_core.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index b871cceeff7c..a1ed8baa5aaa 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -777,7 +777,6 @@ static int l2tp_session_queue_purge(struct l2tp_session *session)
{
struct sk_buff *skb = NULL;
- BUG_ON(!session);
BUG_ON(session->magic != L2TP_SESSION_MAGIC);
while ((skb = skb_dequeue(&session->reorder_q))) {
atomic_long_inc(&session->stats.rx_errors);