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: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
31c14a9703
commit
d59b7d8059
@@ -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);
|
||||
|
Reference in New Issue
Block a user