summaryrefslogtreecommitdiff
path: root/net/sctp/outqueue.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2013-02-04 00:32:57 +0400
committerDavid S. Miller <davem@davemloft.net>2013-02-04 22:26:49 +0400
commit25cc4ae913a46bcc11b03c37bec59568f2122a36 (patch)
tree0a69dfa2c245d48fb44c6f2ab8e93587cf8516a7 /net/sctp/outqueue.c
parent2b3c9a850c3f2da7430c39dde0fb5cab56f8501d (diff)
downloadlinux-25cc4ae913a46bcc11b03c37bec59568f2122a36.tar.xz
net: remove redundant check for timer pending state before del_timer
As in del_timer() there has already placed a timer_pending() function to check whether the timer to be deleted is pending or not, it's unnecessary to check timer pending state again before del_timer() is called. Signed-off-by: Ying Xue <ying.xue@windriver.com> Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r--net/sctp/outqueue.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 9bcdbd02d777..01dca753db16 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -1700,10 +1700,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
* address.
*/
if (!transport->flight_size) {
- if (timer_pending(&transport->T3_rtx_timer) &&
- del_timer(&transport->T3_rtx_timer)) {
+ if (del_timer(&transport->T3_rtx_timer))
sctp_transport_put(transport);
- }
} else if (restart_timer) {
if (!mod_timer(&transport->T3_rtx_timer,
jiffies + transport->rto))