From: WANG Cong Date: Thu, 1 Oct 2015 18:37:43 +0000 (-0700) Subject: act_mirred: always release tcf hash X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=215c90afb9ea633026273d81ac9c9ece2b1acd58;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git act_mirred: always release tcf hash Align with other tc actions. Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller --- diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 3e7c51a8ca38..2efaf4ee6040 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c @@ -107,10 +107,10 @@ static int tcf_mirred_init(struct net *net, struct nlattr *nla, } else { if (bind) return 0; - if (!ovr) { - tcf_hash_release(a, bind); + + tcf_hash_release(a, bind); + if (!ovr) return -EEXIST; - } } m = to_mirred(a);