summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-05-03 16:50:40 +0300
committerDavid S. Miller <davem@davemloft.net>2017-05-04 18:01:30 +0300
commit985538eee06f169bb13c7ecb1a7fcdeb700b05c7 (patch)
treee00e4fffd31e0e771f02175fbb844ffbbb84ce6d /net/sched
parent8b485ce69876c65db12ed390e7f9c0d2a64eff2c (diff)
downloadlinux-985538eee06f169bb13c7ecb1a7fcdeb700b05c7.tar.xz
net/sched: remove redundant null check on head
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>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_matchall.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c
index 2efb36c08f2a..dee469fed967 100644
--- a/net/sched/cls_matchall.c
+++ b/net/sched/cls_matchall.c
@@ -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: