Skip to content

Commit cd3e29b

Browse files
tomparkindavem330
authored andcommitted
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>
1 parent ce2f86a commit cd3e29b

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

‎net/l2tp/l2tp_core.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,8 +1188,6 @@ static void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel)
11881188
struct hlist_node *tmp;
11891189
struct l2tp_session *session;
11901190

1191-
BUG_ON(!tunnel);
1192-
11931191
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n",
11941192
tunnel->name);
11951193

0 commit comments

Comments
 (0)