Skip to content

Commit

Permalink
net_sched: cls_cgroup: remove unnecessary if
Browse files Browse the repository at this point in the history
since head->handle == handle (checked before), just assign handle.

Signed-off-by: Jiri Pirko <[email protected]>
Acked-by: Jamal Hadi Salim <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jpirko authored and davem330 committed Dec 9, 2014
1 parent 2f8a296 commit 18b5427
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions net/sched/cls_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb,
return -ENOBUFS;

tcf_exts_init(&new->exts, TCA_CGROUP_ACT, TCA_CGROUP_POLICE);
if (head)
new->handle = head->handle;
else
new->handle = handle;

new->handle = handle;
new->tp = tp;
err = nla_parse_nested(tb, TCA_CGROUP_MAX, tca[TCA_OPTIONS],
cgroup_policy);
Expand Down

0 comments on commit 18b5427

Please sign in to comment.