aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/act_simple.c')
-rw-r--r--net/sched/act_simple.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index 7725eb4ab756..f7b45ab85388 100644
--- a/net/sched/act_simple.c
+++ b/net/sched/act_simple.c
@@ -142,10 +142,13 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla,
142 ret = ACT_P_CREATED; 142 ret = ACT_P_CREATED;
143 } else { 143 } else {
144 d = to_defact(pc); 144 d = to_defact(pc);
145 if (!ovr) { 145
146 tcf_simp_release(d, bind); 146 if (bind)
147 return 0;
148 tcf_simp_release(d, bind);
149 if (!ovr)
147 return -EEXIST; 150 return -EEXIST;
148 } 151
149 reset_policy(d, defdata, parm); 152 reset_policy(d, defdata, parm);
150 } 153 }
151 154
@@ -201,7 +204,6 @@ static struct tc_action_ops act_simp_ops = {
201 .dump = tcf_simp_dump, 204 .dump = tcf_simp_dump,
202 .cleanup = tcf_simp_cleanup, 205 .cleanup = tcf_simp_cleanup,
203 .init = tcf_simp_init, 206 .init = tcf_simp_init,
204 .walk = tcf_generic_walker,
205}; 207};
206 208
207MODULE_AUTHOR("Jamal Hadi Salim(2005)"); 209MODULE_AUTHOR("Jamal Hadi Salim(2005)");