Skip to content

Commit

Permalink
pkt_sched: ERR_PTR() ususally encodes an negative errno, not positive.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
WANG Cong authored and David S. Miller committed Jun 28, 2008
1 parent 5dbaec5 commit 01e123d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 01e123d

Please sign in to comment.