mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
net_sched: cls_api: fix return value for non-existant classifiers
cls_api should return ENOENT when the requested classifier doesn't exist. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1ac06e0306
commit
f2df824948
1 changed files with 1 additions and 1 deletions
|
@ -220,7 +220,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
|
||||||
tp = kzalloc(sizeof(*tp), GFP_KERNEL);
|
tp = kzalloc(sizeof(*tp), GFP_KERNEL);
|
||||||
if (tp == NULL)
|
if (tp == NULL)
|
||||||
goto errout;
|
goto errout;
|
||||||
err = -EINVAL;
|
err = -ENOENT;
|
||||||
tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND]);
|
tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND]);
|
||||||
if (tp_ops == NULL) {
|
if (tp_ops == NULL) {
|
||||||
#ifdef CONFIG_KMOD
|
#ifdef CONFIG_KMOD
|
||||||
|
|
Loading…
Reference in a new issue