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~91^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f2df824948d559ea818e03486a8583e42ea6ab37;p=linux-2.6-omap-h63xx.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 1086df7478b..9360fc81e8c 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