]> Pileus Git - ~andy/linux/blobdiff - net/sched/act_police.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[~andy/linux] / net / sched / act_police.c
index 819a9a4d19871b2ecccdcd73962b73c7a68241b5..9295b86d5319f6537157efe75adbd1e3f15eaa84 100644 (file)
@@ -162,10 +162,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;
                }
        }