diff options
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r-- | net/sched/sch_api.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 24d17ce9c294..bef2d645a366 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -728,14 +728,14 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, | |||
728 | } else { | 728 | } else { |
729 | const struct Qdisc_class_ops *cops = parent->ops->cl_ops; | 729 | const struct Qdisc_class_ops *cops = parent->ops->cl_ops; |
730 | 730 | ||
731 | err = -EINVAL; | 731 | err = -EOPNOTSUPP; |
732 | 732 | if (cops && cops->graft) { | |
733 | if (cops) { | ||
734 | unsigned long cl = cops->get(parent, classid); | 733 | unsigned long cl = cops->get(parent, classid); |
735 | if (cl) { | 734 | if (cl) { |
736 | err = cops->graft(parent, cl, new, &old); | 735 | err = cops->graft(parent, cl, new, &old); |
737 | cops->put(parent, cl); | 736 | cops->put(parent, cl); |
738 | } | 737 | } else |
738 | err = -ENOENT; | ||
739 | } | 739 | } |
740 | if (!err) | 740 | if (!err) |
741 | notify_and_destroy(skb, n, classid, old, new); | 741 | notify_and_destroy(skb, n, classid, old, new); |