diff options
author | Tonghao Zhang | 2018-12-13 00:43:23 -0800 |
---|---|---|
committer | David S. Miller | 2018-12-15 11:37:32 -0800 |
commit | 2561f97267d656c9b2c62b32614870abb3eabfe6 (patch) | |
tree | b772cc2f68aa9f3e0495b76b8e47d1487517e5ed /net/sched | |
parent | c2027d1e17582903e368abf5d4838b22a98f2b7b (diff) |
net: sched: simplify the qdisc_leaf code
Except for returning, the var leaf is not
used in the qdisc_leaf(). For simplicity, remove it.
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_api.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 9c88cec7e8a2..187a57e7d601 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -335,7 +335,6 @@ out: static struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid) { unsigned long cl; - struct Qdisc *leaf; const struct Qdisc_class_ops *cops = p->ops->cl_ops; if (cops == NULL) @@ -344,8 +343,7 @@ static struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid) if (cl == 0) return NULL; - leaf = cops->leaf(p, cl); - return leaf; + return cops->leaf(p, cl); } /* Find queueing discipline by name */ |