Skip to content

Commit

Permalink
net/sched: remove redundant null check on head
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Colin Ian King authored and davem330 committed May 4, 2017
1 parent 8b485ce commit 985538e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/sched/cls_matchall.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 985538e

Please sign in to comment.