diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-10-23 21:10:56 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-24 12:44:42 +0300 |
commit | 49ca1943a7adb429b11b8e05d81bc821694b76c7 (patch) | |
tree | 25661b484b2304a18a7247604cad2b36b14cd750 /net/ipv4/tcp_minisocks.c | |
parent | 152854025528b30c5ca5113a443ead98c3f1e7a5 (diff) | |
download | linux-49ca1943a7adb429b11b8e05d81bc821694b76c7.tar.xz |
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: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 2341b9f857b6..a952357054f4 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -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 |