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

Commit d59b7d80 authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller
Browse files

net_sched: return nla_nest_end() instead of skb->len



nla_nest_end() already has return skb->len, so replace
return skb->len with return nla_nest_end instead().

Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 31c14a97
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -623,8 +623,7 @@ static int atm_tc_dump_class(struct Qdisc *sch, unsigned long cl,
		if (nla_put_u32(skb, TCA_ATM_EXCESS, 0))
			goto nla_put_failure;
	}
	nla_nest_end(skb, nest);
	return skb->len;
	return nla_nest_end(skb, nest);

nla_put_failure:
	nla_nest_cancel(skb, nest);
+2 −4
Original line number Diff line number Diff line
@@ -1563,8 +1563,7 @@ static int cbq_dump(struct Qdisc *sch, struct sk_buff *skb)
		goto nla_put_failure;
	if (cbq_dump_attr(skb, &q->link) < 0)
		goto nla_put_failure;
	nla_nest_end(skb, nest);
	return skb->len;
	return nla_nest_end(skb, nest);

nla_put_failure:
	nla_nest_cancel(skb, nest);
@@ -1599,8 +1598,7 @@ cbq_dump_class(struct Qdisc *sch, unsigned long arg,
		goto nla_put_failure;
	if (cbq_dump_attr(skb, cl) < 0)
		goto nla_put_failure;
	nla_nest_end(skb, nest);
	return skb->len;
	return nla_nest_end(skb, nest);

nla_put_failure:
	nla_nest_cancel(skb, nest);
+1 −2
Original line number Diff line number Diff line
@@ -781,8 +781,7 @@ static int fq_dump(struct Qdisc *sch, struct sk_buff *skb)
	    nla_put_u32(skb, TCA_FQ_BUCKETS_LOG, q->fq_trees_log))
		goto nla_put_failure;

	nla_nest_end(skb, opts);
	return skb->len;
	return nla_nest_end(skb, opts);

nla_put_failure:
	return -1;
+1 −2
Original line number Diff line number Diff line
@@ -450,8 +450,7 @@ static int fq_codel_dump(struct Qdisc *sch, struct sk_buff *skb)
			q->flows_cnt))
		goto nla_put_failure;

	nla_nest_end(skb, opts);
	return skb->len;
	return nla_nest_end(skb, opts);

nla_put_failure:
	return -1;
+1 −2
Original line number Diff line number Diff line
@@ -1353,8 +1353,7 @@ hfsc_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb,
		goto nla_put_failure;
	if (hfsc_dump_curves(skb, cl) < 0)
		goto nla_put_failure;
	nla_nest_end(skb, nest);
	return skb->len;
	return nla_nest_end(skb, nest);

 nla_put_failure:
	nla_nest_cancel(skb, nest);
Loading