Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49ca1943 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by David S. Miller
Browse files

ipv4: tcp_minisocks: use BUG_ON instead of if condition followed by BUG



Use BUG_ON instead of if condition followed by BUG in tcp_time_wait.

This issue was detected with the help of Coccinelle.

Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 15285402
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -298,8 +298,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
			key = tp->af_specific->md5_lookup(sk, sk);
			if (key) {
				tcptw->tw_md5_key = kmemdup(key, sizeof(*key), GFP_ATOMIC);
				if (tcptw->tw_md5_key && !tcp_alloc_md5sig_pool())
					BUG();
				BUG_ON(tcptw->tw_md5_key && !tcp_alloc_md5sig_pool());
			}
		} while (0);
#endif