From: Patrick McHardy Date: Tue, 20 May 2008 21:34:46 +0000 (-0700) Subject: net_sched: cls_api: fix return value for non-existant classifiers X-Git-Tag: v2.6.25.7~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58c1bcf7e5454a95ef8997f7c769361d687bfd82;p=thirdparty%2Fkernel%2Fstable.git net_sched: cls_api: fix return value for non-existant classifiers [ upstream commit: f2df824948d559ea818e03486a8583e42ea6ab37 ] cls_api should return ENOENT when the requested classifier doesn't exist. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller Signed-off-by: Chris Wright --- diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 0fbedcabf1110..855c33c1ebb5e 100644 --- a/net/sched/cls_api.c +++ b/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