X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=net%2Fsched%2Fact_police.c;h=ef246d87e68bbdf628bc00eebb05e9cb88a3cb87;hb=1a29321ed045e3aad23c5f7b63036e465ee3093a;hp=272d8e924cf6b2467e2772898aca2d7895131545;hpb=652787ab1aca35e5e85e644757f7ea2cc00681d1;p=firefly-linux-kernel-4.4.55.git diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 272d8e924cf6..ef246d87e68b 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -177,10 +177,12 @@ static int tcf_act_police_locate(struct net *net, struct nlattr *nla, if (bind) { police->tcf_bindcnt += 1; police->tcf_refcnt += 1; + return 0; } if (ovr) goto override; - return ret; + /* not replacing */ + return -EEXIST; } } @@ -407,7 +409,6 @@ static struct tc_action_ops act_police_ops = { .act = tcf_act_police, .dump = tcf_act_police_dump, .cleanup = tcf_act_police_cleanup, - .lookup = tcf_hash_search, .init = tcf_act_police_locate, .walk = tcf_act_police_walker };