]> Pileus Git - ~andy/linux/blobdiff - net/sched/cls_basic.c
net: Convert net_ratelimit uses to net_<level>_ratelimited
[~andy/linux] / net / sched / cls_basic.c
index ea1f70b5a5f4747f2988c0b354a0abac7f2443da..590960a22a77fb0747c2fc42c78caff686cd8ac8 100644 (file)
@@ -257,8 +257,9 @@ static int basic_dump(struct tcf_proto *tp, unsigned long fh,
        if (nest == NULL)
                goto nla_put_failure;
 
-       if (f->res.classid)
-               NLA_PUT_U32(skb, TCA_BASIC_CLASSID, f->res.classid);
+       if (f->res.classid &&
+           nla_put_u32(skb, TCA_BASIC_CLASSID, f->res.classid))
+               goto nla_put_failure;
 
        if (tcf_exts_dump(skb, &f->exts, &basic_ext_map) < 0 ||
            tcf_em_tree_dump(skb, &f->ematches, TCA_BASIC_EMATCHES) < 0)