Skip to contentSkip to conversation

: cls_api: fix return value for non-existant classifiers

NET_SCHED Patrick McHardy 2 participants 2 messages May 20, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

commit 32fcfbb0b16a119534a0cfe750a0925b3c710b39

Author: Patrick McHardy <[email protected]>
Date:   Tue May 20 04:27:25 2008 +0200

[NET_SCHED]: cls_api: fix return value for non-existant classifiers

cls_api should return ENOENT when the requested classifier doesn't exist.

net/sched/cls_api.c +1 -1
index 1086df7..9360fc8 100644
@@ -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