net: sched: cls: use nla_nest_cancel instead of nlmsg_trim

To cancel nesting, this function is more convenient.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko
2014-12-09 22:23:29 +01:00
committed by David S. Miller
parent f9c5c62db1
commit 6ea3b446b9
6 changed files with 8 additions and 13 deletions

View File

@@ -653,7 +653,6 @@ static int rsvp_dump(struct net *net, struct tcf_proto *tp, unsigned long fh,
{
struct rsvp_filter *f = (struct rsvp_filter *)fh;
struct rsvp_session *s;
unsigned char *b = skb_tail_pointer(skb);
struct nlattr *nest;
struct tc_rsvp_pinfo pinfo;
@@ -694,7 +693,7 @@ static int rsvp_dump(struct net *net, struct tcf_proto *tp, unsigned long fh,
return skb->len;
nla_put_failure:
nlmsg_trim(skb, b);
nla_nest_cancel(skb, nest);
return -1;
}