summaryrefslogtreecommitdiffstats
path: root/net/bridge
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/bridge
parent2b3c9a850c3f2da7430c39dde0fb5cab56f8501d (diff)
downloadop-kernel-dev-25cc4ae913a46bcc11b03c37bec59568f2122a36.zip
op-kernel-dev-25cc4ae913a46bcc11b03c37bec59568f2122a36.tar.gz
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/bridge')
-rw-r--r--net/bridge/netfilter/ebt_ulog.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index 3476ec4..3bf43f7 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -70,8 +70,7 @@ static void ulog_send(unsigned int nlgroup)
{
ebt_ulog_buff_t *ub = &ulog_buffers[nlgroup];
- if (timer_pending(&ub->timer))
- del_timer(&ub->timer);
+ del_timer(&ub->timer);
if (!ub->skb)
return;
@@ -319,8 +318,7 @@ static void __exit ebt_ulog_fini(void)
xt_unregister_target(&ebt_ulog_tg_reg);
for (i = 0; i < EBT_ULOG_MAXNLGROUPS; i++) {
ub = &ulog_buffers[i];
- if (timer_pending(&ub->timer))
- del_timer(&ub->timer);
+ del_timer(&ub->timer);
spin_lock_bh(&ub->lock);
if (ub->skb) {
kfree_skb(ub->skb);
OpenPOWER on IntegriCloud