aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_sample.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2019-09-22 22:29:00 +0200
committerJiri Kosina <jkosina@suse.cz>2019-09-22 22:29:00 +0200
commit53c716412708db7000e06292fb89b2609f9a48f7 (patch)
tree3ede481ee0926f0e53e14bba61028d307d58296c /net/sched/act_sample.c
parentMerge branch 'for-5.3/upstream-fixes' into for-linus (diff)
parentHID: apple: Fix stuck function keys when using FN (diff)
downloadlinux-dev-53c716412708db7000e06292fb89b2609f9a48f7.tar.xz
linux-dev-53c716412708db7000e06292fb89b2609f9a48f7.zip
Merge branch 'for-5.4/apple' into for-linus
- stuck 'fn' key fix for hid-apple from Joao Moreno Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'net/sched/act_sample.c')
-rw-r--r--net/sched/act_sample.c10
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,
struct tc_action_net *tn = net_generic(net, sample_net_id);
struct nlattr *tb[TCA_SAMPLE_MAX + 1];
struct psample_group *psample_group;
+ u32 psample_group_num, rate, index;
struct tcf_chain *goto_ch = NULL;
- u32 psample_group_num, rate;
struct tc_sample *parm;
struct tcf_sample *s;
bool exists = false;
@@ -59,8 +59,8 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla,
return -EINVAL;
parm = nla_data(tb[TCA_SAMPLE_PARMS]);
-
- err = tcf_idr_check_alloc(tn, &parm->index, a, bind);
+ index = parm->index;
+ err = tcf_idr_check_alloc(tn, &index, a, bind);
if (err < 0)
return err;
exists = err;
@@ -68,10 +68,10 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla,
return 0;
if (!exists) {
- ret = tcf_idr_create(tn, parm->index, est, a,
+ ret = tcf_idr_create(tn, index, est, a,
&act_sample_ops, bind, true);
if (ret) {
- tcf_idr_cleanup(tn, parm->index);
+ tcf_idr_cleanup(tn, index);
return ret;
}
ret = ACT_P_CREATED;