浏览代码

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>
Patrick McHardy 17 年之前
父节点
当前提交
f2df824948
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/sched/cls_api.c

+ 1 - 1
net/sched/cls_api.c

@@ -220,7 +220,7 @@ replay:
 		tp = kzalloc(sizeof(*tp), GFP_KERNEL);
 		if (tp == NULL)
 			goto errout;
-		err = -EINVAL;
+		err = -ENOENT;
 		tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND]);
 		if (tp_ops == NULL) {
 #ifdef CONFIG_KMOD