summaryrefslogtreecommitdiff
path: root/net/sctp/input.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/input.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/input.c')
-rw-r--r--net/sctp/input.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 8bd3c279427e..965bbbbe48d4 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -468,8 +468,7 @@ void sctp_icmp_proto_unreachable(struct sock *sk,
} else {
struct net *net = sock_net(sk);
- if (timer_pending(&t->proto_unreach_timer) &&
- del_timer(&t->proto_unreach_timer))
+ if (del_timer(&t->proto_unreach_timer))
sctp_association_put(asoc);
sctp_do_sm(net, SCTP_EVENT_T_OTHER,