net/sched/sch_generic.c: fix an error pointer
Subsystems (3)
PATCH 1/1 net/sched/sch_generic.c: fix an error pointer
ERR_PTR() ususally encodes an negative errno, not positive.
Note, in the following patch, 'err' is initialized as:
int err = -ENOBUFS;
---
net/sched/sch_generic.c +0 -0
@@ -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, structQdisc_ops *ops,
David Miller
maintainerFrom: WANG Cong <[email protected]>
Date: Thu, 19 Jun 2008 15:37:14 +0100
Quoted 7 lines
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 <[email protected]>
Patch is whitespace corruped and line wrapped by your email client.
Please fix this and resubmit, thank you.
Quoted 7 lines · David Miller
From: WANG Cong <[email protected]>
Date: Thu, 19 Jun 2008 15:37:14 +0100Quoted 4 lines
ERR_PTR()ususally encodes an negative errno, not positive.Note, in the following patch, 'err' is initialized as:
Quoted 8 lines
Quoted 3 lines
int err =
-ENOBUFS;Signed-off-by WANG Cong <[email protected]>Patch is whitespace corruped and line wrapped by your email client.
Please fix this and resubmit, thank you.
I am very sorry for this. Resend it with mutt. :-)
--------------->
ERR_PTR() ususally encodes an negative errno, not positive.
Note, in the following patch, 'err' is initialized as:
int err = -ENOBUFS;
---
net/sched/sch_generic.c +1 -1
@@ -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,
David Miller
maintainerFrom: WANG Cong <[email protected]>
Date: Sat, 21 Jun 2008 20:55:26 +0100
Quoted 7 lines
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 <[email protected]>
Patch applied, th anks.