]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/sched/sch_qfq.c
mISDN: Implement MISDN_CTRL_RX_OFF for more drivers
[mirror_ubuntu-bionic-kernel.git] / net / sched / sch_qfq.c
index e68cb440756a4c33ce1108d464ea51b1c0b95631..9af01f3df18c66b6325c8afe628758b56e306952 100644 (file)
@@ -429,8 +429,9 @@ static int qfq_dump_class(struct Qdisc *sch, unsigned long arg,
        nest = nla_nest_start(skb, TCA_OPTIONS);
        if (nest == NULL)
                goto nla_put_failure;
-       NLA_PUT_U32(skb, TCA_QFQ_WEIGHT, ONE_FP/cl->inv_w);
-       NLA_PUT_U32(skb, TCA_QFQ_LMAX, cl->lmax);
+       if (nla_put_u32(skb, TCA_QFQ_WEIGHT, ONE_FP/cl->inv_w) ||
+           nla_put_u32(skb, TCA_QFQ_LMAX, cl->lmax))
+               goto nla_put_failure;
        return nla_nest_end(skb, nest);
 
 nla_put_failure: