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-Url: https://git.stricted.de/?a=commitdiff_plain;h=f2df824948d559ea818e03486a8583e42ea6ab37;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.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 1086df7478bc..9360fc81e8c7 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