Commit cd3e29b3 authored by Tom Parkin's avatar Tom Parkin Committed by David S. Miller

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: default avatarTom Parkin <tparkin@katalix.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ce2f86ae
...@@ -1188,8 +1188,6 @@ static void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) ...@@ -1188,8 +1188,6 @@ static void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel)
struct hlist_node *tmp; struct hlist_node *tmp;
struct l2tp_session *session; struct l2tp_session *session;
BUG_ON(!tunnel);
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n", l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n",
tunnel->name); tunnel->name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment