]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net/sched: remove redundant null check on head
authorColin Ian King <colin.king@canonical.com>
Wed, 3 May 2017 13:50:40 +0000 (14:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 May 2017 15:01:30 +0000 (11:01 -0400)
head is previously null checked and so the 2nd null check on head
is redundant and therefore can be removed.

Detected by CoverityScan, CID#1399505 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_matchall.c

index 2efb36c08f2a57051f5412fcb479bc7e531e7fa3..dee469fed9671d518dbeddd6bd48d96cc9158675 100644 (file)
@@ -203,8 +203,7 @@ static int mall_change(struct net *net, struct sk_buff *in_skb,
 
        *arg = (unsigned long) head;
        rcu_assign_pointer(tp->root, new);
-       if (head)
-               call_rcu(&head->rcu, mall_destroy_rcu);
+       call_rcu(&head->rcu, mall_destroy_rcu);
        return 0;
 
 err_replace_hw_filter: