summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2013-02-03 20:32:57 +0000
committerDavid S. Miller <davem@davemloft.net>2013-02-04 13:26:49 -0500
commit25cc4ae913a46bcc11b03c37bec59568f2122a36 (patch)
tree0a69dfa2c245d48fb44c6f2ab8e93587cf8516a7 /net/core
parent2b3c9a850c3f2da7430c39dde0fb5cab56f8501d (diff)
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/core')
-rw-r--r--net/core/sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 235fb89e8973..f1e14e20d181 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2230,7 +2230,7 @@ EXPORT_SYMBOL(sk_reset_timer);
void sk_stop_timer(struct sock *sk, struct timer_list* timer)
{
- if (timer_pending(timer) && del_timer(timer))
+ if (del_timer(timer))
__sock_put(sk);
}
EXPORT_SYMBOL(sk_stop_timer);