diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 9d775b8df57d4fef4635e2f2fe62832633d86d50..c719a41d2eba22d7b90794fa3bebcb544fbe4215 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -443,10 +443,8 @@ void tcp_retransmit_timer(struct sock *sk) */ return; } - if (!tp->packets_out) - goto out; - - WARN_ON(tcp_rtx_queue_empty(sk)); + if (!tp->packets_out || WARN_ON_ONCE(tcp_rtx_queue_empty(sk))) + return; tp->tlp_high_seq = 0;