aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp/l2tp_core.c
diff options
context:
space:
mode:
authorTom Parkin <tparkin@katalix.com>2020-07-24 16:31:52 +0100
committerDavid S. Miller <davem@davemloft.net>2020-07-24 17:19:14 -0700
commitcd3e29b333cc2571a5875d1b45c460dc948a2f95 (patch)
treeb811f95e535e4ba7060c1cc60b9698ff8bd8425e /net/l2tp/l2tp_core.c
parentl2tp: remove BUG_ON in l2tp_session_queue_purge (diff)
downloadlinux-dev-cd3e29b333cc2571a5875d1b45c460dc948a2f95.tar.xz
linux-dev-cd3e29b333cc2571a5875d1b45c460dc948a2f95.zip
l2tp: remove BUG_ON in l2tp_tunnel_closeall
l2tp_tunnel_closeall is only called from l2tp_core.c, and it's easy to statically analyse the code path calling it to validate that it should never be passed a NULL tunnel pointer. Having a BUG_ON checking the tunnel 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/l2tp/l2tp_core.c')
-rw-r--r--net/l2tp/l2tp_core.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index a1ed8baa5aaa..6be3f2e69efd 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -1188,8 +1188,6 @@ static void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel)
struct hlist_node *tmp;
struct l2tp_session *session;
- BUG_ON(!tunnel);
-
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n",
tunnel->name);