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-Url: https://git.stricted.de/?a=commitdiff_plain;h=01e123d79a23000f85c4cfb12a957908c0b2c3d8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 d355e5e47fe3..13afa7214392 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,