]> err.no Git - linux-2.6/blobdiff - net/sched/sch_red.c
pkt_sched: ERR_PTR() ususally encodes an negative errno, not positive.
[linux-2.6] / net / sched / sch_red.c
index 3dcd493f4f4a93b6d1e064f8214d83082cfee31b..5c569853b9c052967fbe9b2ca66f8e651985f206 100644 (file)
@@ -281,7 +281,8 @@ static int red_dump(struct Qdisc *sch, struct sk_buff *skb)
        return nla_nest_end(skb, opts);
 
 nla_put_failure:
-       return nla_nest_cancel(skb, opts);
+       nla_nest_cancel(skb, opts);
+       return -EMSGSIZE;
 }
 
 static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d)