]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
pkt_sched: ERR_PTR() ususally encodes an negative errno, not positive.
authorWANG Cong <wcong@critical-links.com>
Sat, 28 Jun 2008 02:51:35 +0000 (19:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Jun 2008 02:51:35 +0000 (19:51 -0700)
Note, in the following patch, 'err' is initialized as:

int err = -ENOBUFS;

Signed-off-by: WANG Cong <wcong@critical-links.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_generic.c

index d355e5e47fe3a71aca1d151db1ce72429a069297..13afa7214392a74998ebbad3576ae4bb7a6d4638 100644 (file)
@@ -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,