]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/sched/act_api.c
Merge tag 'iommu-fix-v4.11-rc0-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-artful-kernel.git] / net / sched / act_api.c
index f219ff325ed4b816866e46a66c97c6f7724ec81f..b70aa57319ea3233395dc7ae349b8b7aab5dfd03 100644 (file)
@@ -613,8 +613,8 @@ struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla,
                        goto err_mod;
                }
 
-               err = nla_memdup_cookie(a, tb);
-               if (err < 0) {
+               if (nla_memdup_cookie(a, tb) < 0) {
+                       err = -ENOMEM;
                        tcf_hash_release(a, bind);
                        goto err_mod;
                }
@@ -859,10 +859,8 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
                goto out_module_put;
 
        err = ops->walk(net, skb, &dcb, RTM_DELACTION, ops);
-       if (err < 0)
+       if (err <= 0)
                goto out_module_put;
-       if (err == 0)
-               goto noflush_out;
 
        nla_nest_end(skb, nest);
 
@@ -879,7 +877,6 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
 out_module_put:
        module_put(ops->owner);
 err_out:
-noflush_out:
        kfree_skb(skb);
        return err;
 }