diff options
Diffstat (limited to 'net/sched/act_sample.c')
-rw-r--r-- | net/sched/act_sample.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c index 274d7a0c0e25..595308d60133 100644 --- a/net/sched/act_sample.c +++ b/net/sched/act_sample.c | |||
@@ -41,8 +41,8 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla, | |||
41 | struct tc_action_net *tn = net_generic(net, sample_net_id); | 41 | struct tc_action_net *tn = net_generic(net, sample_net_id); |
42 | struct nlattr *tb[TCA_SAMPLE_MAX + 1]; | 42 | struct nlattr *tb[TCA_SAMPLE_MAX + 1]; |
43 | struct psample_group *psample_group; | 43 | struct psample_group *psample_group; |
44 | u32 psample_group_num, rate, index; | ||
44 | struct tcf_chain *goto_ch = NULL; | 45 | struct tcf_chain *goto_ch = NULL; |
45 | u32 psample_group_num, rate; | ||
46 | struct tc_sample *parm; | 46 | struct tc_sample *parm; |
47 | struct tcf_sample *s; | 47 | struct tcf_sample *s; |
48 | bool exists = false; | 48 | bool exists = false; |
@@ -59,8 +59,8 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla, | |||
59 | return -EINVAL; | 59 | return -EINVAL; |
60 | 60 | ||
61 | parm = nla_data(tb[TCA_SAMPLE_PARMS]); | 61 | parm = nla_data(tb[TCA_SAMPLE_PARMS]); |
62 | 62 | index = parm->index; | |
63 | err = tcf_idr_check_alloc(tn, &parm->index, a, bind); | 63 | err = tcf_idr_check_alloc(tn, &index, a, bind); |
64 | if (err < 0) | 64 | if (err < 0) |
65 | return err; | 65 | return err; |
66 | exists = err; | 66 | exists = err; |
@@ -68,10 +68,10 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla, | |||
68 | return 0; | 68 | return 0; |
69 | 69 | ||
70 | if (!exists) { | 70 | if (!exists) { |
71 | ret = tcf_idr_create(tn, parm->index, est, a, | 71 | ret = tcf_idr_create(tn, index, est, a, |
72 | &act_sample_ops, bind, true); | 72 | &act_sample_ops, bind, true); |
73 | if (ret) { | 73 | if (ret) { |
74 | tcf_idr_cleanup(tn, parm->index); | 74 | tcf_idr_cleanup(tn, index); |
75 | return ret; | 75 | return ret; |
76 | } | 76 | } |
77 | ret = ACT_P_CREATED; | 77 | ret = ACT_P_CREATED; |