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:
Yang Yingliang 2014-03-12 10:20:32 +08:00 committed by David S. Miller
parent 31c14a9703
commit d59b7d8059
8 changed files with 9 additions and 18 deletions

View File

@ -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)) if (nla_put_u32(skb, TCA_ATM_EXCESS, 0))
goto nla_put_failure; goto nla_put_failure;
} }
nla_nest_end(skb, nest); return nla_nest_end(skb, nest);
return skb->len;
nla_put_failure: nla_put_failure:
nla_nest_cancel(skb, nest); nla_nest_cancel(skb, nest);

View File

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

View File

@ -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)) nla_put_u32(skb, TCA_FQ_BUCKETS_LOG, q->fq_trees_log))
goto nla_put_failure; goto nla_put_failure;
nla_nest_end(skb, opts); return nla_nest_end(skb, opts);
return skb->len;
nla_put_failure: nla_put_failure:
return -1; return -1;

View File

@ -450,8 +450,7 @@ static int fq_codel_dump(struct Qdisc *sch, struct sk_buff *skb)
q->flows_cnt)) q->flows_cnt))
goto nla_put_failure; goto nla_put_failure;
nla_nest_end(skb, opts); return nla_nest_end(skb, opts);
return skb->len;
nla_put_failure: nla_put_failure:
return -1; return -1;

View File

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

View File

@ -691,8 +691,7 @@ static int hhf_dump(struct Qdisc *sch, struct sk_buff *skb)
nla_put_u32(skb, TCA_HHF_NON_HH_WEIGHT, q->hhf_non_hh_weight)) nla_put_u32(skb, TCA_HHF_NON_HH_WEIGHT, q->hhf_non_hh_weight))
goto nla_put_failure; goto nla_put_failure;
nla_nest_end(skb, opts); return nla_nest_end(skb, opts);
return skb->len;
nla_put_failure: nla_put_failure:
return -1; return -1;

View File

@ -100,8 +100,7 @@ static int ingress_dump(struct Qdisc *sch, struct sk_buff *skb)
nest = nla_nest_start(skb, TCA_OPTIONS); nest = nla_nest_start(skb, TCA_OPTIONS);
if (nest == NULL) if (nest == NULL)
goto nla_put_failure; goto nla_put_failure;
nla_nest_end(skb, nest); return nla_nest_end(skb, nest);
return skb->len;
nla_put_failure: nla_put_failure:
nla_nest_cancel(skb, nest); nla_nest_cancel(skb, nest);

View File

@ -475,8 +475,7 @@ static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb)
nla_put_u64(skb, TCA_TBF_PRATE64, q->peak.rate_bytes_ps)) nla_put_u64(skb, TCA_TBF_PRATE64, q->peak.rate_bytes_ps))
goto nla_put_failure; goto nla_put_failure;
nla_nest_end(skb, nest); return nla_nest_end(skb, nest);
return skb->len;
nla_put_failure: nla_put_failure:
nla_nest_cancel(skb, nest); nla_nest_cancel(skb, nest);