summaryrefslogtreecommitdiffstats
path: root/net/sched/act_gact.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-26 06:12:32 +0100
committerDavid S. Miller <davem@davemloft.net>2008-11-26 06:13:25 +0100
commit0e991ec6a0340916d3f29bd5dcb35299069e7226 (patch)
treef8353915d1100b780e057a52f5be84102454af85 /net/sched/act_gact.c
parentne2000: convert to net_device_ops (diff)
downloadlinux-0e991ec6a0340916d3f29bd5dcb35299069e7226.tar.xz
linux-0e991ec6a0340916d3f29bd5dcb35299069e7226.zip
tc: propogate errors from tcf_hash_create
Allow tcf_hash_create to return different errors on estimator failure. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_gact.c')
-rw-r--r--net/sched/act_gact.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c
index ac04289da5d7..e7f796aec657 100644
--- a/net/sched/act_gact.c
+++ b/net/sched/act_gact.c
@@ -88,8 +88,8 @@ static int tcf_gact_init(struct nlattr *nla, struct nlattr *est,
if (!pc) {
pc = tcf_hash_create(parm->index, est, a, sizeof(*gact),
bind, &gact_idx_gen, &gact_hash_info);
- if (unlikely(!pc))
- return -ENOMEM;
+ if (IS_ERR(pc))
+ return PTR_ERR(pc);
ret = ACT_P_CREATED;
} else {
if (!ovr) {