From c5d39acbfa703d3dbc3eda56dae027a16ed97e7f Mon Sep 17 00:00:00 2001 From: Rostislav Lisovy Date: Mon, 4 Jun 2012 14:13:05 +0200 Subject: [PATCH] cls_can: Stop using NLA_PUT*() --- net/sched/cls_can.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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); -- 2.39.2