pkt_sched: Stop using NLA_PUT*().
[firefly-linux-kernel-4.4.55.git] / net / sched / sch_hfsc.c
index 9bdca2e011e9122de321353037d4ed2891008601..8db3e2c72827ff28094b20e34f0b26b3815d0437 100644 (file)
@@ -1305,7 +1305,8 @@ hfsc_dump_sc(struct sk_buff *skb, int attr, struct internal_sc *sc)
        tsc.m1 = sm2m(sc->sm1);
        tsc.d  = dx2d(sc->dx);
        tsc.m2 = sm2m(sc->sm2);
-       NLA_PUT(skb, attr, sizeof(tsc), &tsc);
+       if (nla_put(skb, attr, sizeof(tsc), &tsc))
+               goto nla_put_failure;
 
        return skb->len;
 
@@ -1573,7 +1574,8 @@ hfsc_dump_qdisc(struct Qdisc *sch, struct sk_buff *skb)
        }
 
        qopt.defcls = q->defcls;
-       NLA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt);
+       if (nla_put(skb, TCA_OPTIONS, sizeof(qopt), &qopt))
+               goto nla_put_failure;
        return skb->len;
 
  nla_put_failure: