From: Rostislav Lisovy Date: Mon, 4 Jun 2012 12:13:05 +0000 (+0200) Subject: cls_can: Stop using NLA_PUT*() X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lisovros/linux_canprio.git/commitdiff_plain/c5d39acbfa703d3dbc3eda56dae027a16ed97e7f cls_can: Stop using NLA_PUT*() --- diff --git a/net/sched/cls_can.c b/net/sched/cls_can.c index 111668e41e8..dcb27920be9 100644 --- a/net/sched/cls_can.c +++ b/net/sched/cls_can.c @@ -519,12 +519,13 @@ static int canfltr_dump(struct tcf_proto *tp, unsigned long fh, if (nest == NULL) goto nla_put_failure; - if (f->res.classid) - NLA_PUT_U32(skb, TCA_CANFLTR_CLASSID, f->res.classid); - - NLA_PUT(skb, TCA_CANFLTR_RULES, r->rules_count * - sizeof(struct can_filter), r->rules_raw); + if (f->res.classid && + nla_put_u32(skb, TCA_CANFLTR_CLASSID, f->res.classid)) + goto nla_put_failure; + if (nla_put(skb, TCA_CANFLTR_RULES, r->rules_count * + sizeof(struct can_filter), r->rules_raw) + goto nla_put_failure; nla_nest_end(skb, nest);