Skip to contentSkip to conversation

net/sched/sch_generic.c: fix an error pointer

PATCH In review WANG Cong 3 participants 4 messages Jun 19, 2008 – Jun 28, 2008

Subsystems (3)
lore
Share & tools
lore

WANG Cong

author
#0 lore raw

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;

Cc David Miller <[email protected]>
Cc Alexey Kuznetsov <[email protected]>

---

net/sched/sch_generic.c +0 -0
index d355e5e..13afa72 100644
@@ -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,

maintainer
#1 lore raw

From: 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;

Patch is whitespace corruped and line wrapped by your email client.

Please fix this and resubmit, thank you.

#2 lore raw
Quoted 7 lines · David Miller

From: WANG Cong <[email protected]>
Date: Thu, 19 Jun 2008 15:37:14 +0100

Quoted 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;

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;

Cc David Miller <[email protected]>
Cc Alexey Kuznetsov <[email protected]>

---

net/sched/sch_generic.c +1 -1
index d355e5e..13afa72 100644
@@ -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,
maintainer
#3 lore raw

From: 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;

Patch applied, th anks.