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.26-rc4~7^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2df824948d559ea818e03486a8583e42ea6ab37;p=platform%2Fkernel%2Flinux-3.10.git 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 Signed-off-by: David S. Miller --- diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 1086df7..9360fc8 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