From: WANG Cong Date: Sat, 28 Jun 2008 02:51:35 +0000 (-0700) Subject: pkt_sched: ERR_PTR() ususally encodes an negative errno, not positive. X-Git-Tag: v2.6.26-rc9~84^2~19 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01e123d79a23000f85c4cfb12a957908c0b2c3d8;p=linux-2.6 pkt_sched: ERR_PTR() ususally encodes an negative errno, not positive. Note, in the following patch, 'err' is initialized as: int err = -ENOBUFS; Signed-off-by: WANG Cong Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index d355e5e47f..13afa72143 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -468,7 +468,7 @@ struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops) return sch; errout: - return ERR_PTR(-err); + return ERR_PTR(err); } struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops,