diff options
author | Ying Xue <ying.xue@windriver.com> | 2013-02-03 20:32:57 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-04 13:26:49 -0500 |
commit | 25cc4ae913a46bcc11b03c37bec59568f2122a36 (patch) | |
tree | 0a69dfa2c245d48fb44c6f2ab8e93587cf8516a7 /net/ipv4 | |
parent | 2b3c9a850c3f2da7430c39dde0fb5cab56f8501d (diff) | |
download | linux-3.10-25cc4ae913a46bcc11b03c37bec59568f2122a36.tar.gz linux-3.10-25cc4ae913a46bcc11b03c37bec59568f2122a36.tar.bz2 linux-3.10-25cc4ae913a46bcc11b03c37bec59568f2122a36.zip |
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/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ipt_ULOG.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c index b5ef3cba225..7d168dcbd13 100644 --- a/net/ipv4/netfilter/ipt_ULOG.c +++ b/net/ipv4/netfilter/ipt_ULOG.c @@ -88,10 +88,8 @@ static void ulog_send(unsigned int nlgroupnum) { ulog_buff_t *ub = &ulog_buffers[nlgroupnum]; - if (timer_pending(&ub->timer)) { - pr_debug("ulog_send: timer was pending, deleting\n"); - del_timer(&ub->timer); - } + pr_debug("ulog_send: timer is deleting\n"); + del_timer(&ub->timer); if (!ub->skb) { pr_debug("ulog_send: nothing to send\n"); @@ -426,10 +424,8 @@ static void __exit ulog_tg_exit(void) /* remove pending timers and free allocated skb's */ for (i = 0; i < ULOG_MAXNLGROUPS; i++) { ub = &ulog_buffers[i]; - if (timer_pending(&ub->timer)) { - pr_debug("timer was pending, deleting\n"); - del_timer(&ub->timer); - } + pr_debug("timer is deleting\n"); + del_timer(&ub->timer); if (ub->skb) { kfree_skb(ub->skb); |