Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2561f972 authored by Tonghao Zhang's avatar Tonghao Zhang Committed by David S. Miller
Browse files

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: default avatarTonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c2027d1e
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -335,7 +335,6 @@ struct Qdisc *qdisc_lookup_rcu(struct net_device *dev, u32 handle)
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 */