]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/sched/act_pedit.c
net/act_pedit: fix an error code
[karo-tx-linux.git] / net / sched / act_pedit.c
index c1310472f620fd44b9ae8a6cfeefef5419cad54e..7dc5892671c818db55b024b10d56ec2252c2f826 100644 (file)
@@ -72,7 +72,7 @@ static struct tcf_pedit_key_ex *tcf_pedit_keys_ex_parse(struct nlattr *nla,
                }
 
                err = nla_parse_nested(tb, TCA_PEDIT_KEY_EX_MAX, ka,
-                                      pedit_key_ex_policy);
+                                      pedit_key_ex_policy, NULL);
                if (err)
                        goto err_out;
 
@@ -94,8 +94,10 @@ static struct tcf_pedit_key_ex *tcf_pedit_keys_ex_parse(struct nlattr *nla,
                k++;
        }
 
-       if (n)
+       if (n) {
+               err = -EINVAL;
                goto err_out;
+       }
 
        return keys_ex;
 
@@ -147,7 +149,7 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla,
        if (nla == NULL)
                return -EINVAL;
 
-       err = nla_parse_nested(tb, TCA_PEDIT_MAX, nla, pedit_policy);
+       err = nla_parse_nested(tb, TCA_PEDIT_MAX, nla, pedit_policy, NULL);
        if (err < 0)
                return err;