mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
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 <[email protected]> Cc: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
2b3c9a850c
commit
25cc4ae913
11 changed files with 21 additions and 38 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue