Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328135
b: refs/heads/master
c: 188c517
h: refs/heads/master
i:
  328133: 681c8b8
  328131: b38b76c
  328127: 63a960d
v: v3
  • Loading branch information
Lin Ming authored and David S. Miller committed Sep 28, 2012
1 parent 349508c commit e8c4b3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24cad1b4ce9e9da6ec22cfc9361bbbe0ba4f80cc
refs/heads/master: 188c517a050ec5b123e72cab76ea213721e5bd9d
20 changes: 6 additions & 14 deletions trunk/net/ipv6/ip6_fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
ln = node_alloc();

if (!ln)
return NULL;
return ERR_PTR(-ENOMEM);
ln->fn_bit = plen;

ln->parent = pn;
Expand Down Expand Up @@ -561,7 +561,7 @@ static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
node_free(in);
if (ln)
node_free(ln);
return NULL;
return ERR_PTR(-ENOMEM);
}

/*
Expand Down Expand Up @@ -611,7 +611,7 @@ static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
ln = node_alloc();

if (!ln)
return NULL;
return ERR_PTR(-ENOMEM);

ln->fn_bit = plen;

Expand Down Expand Up @@ -777,11 +777,8 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info)

if (IS_ERR(fn)) {
err = PTR_ERR(fn);
fn = NULL;
}

if (!fn)
goto out;
}

pn = fn;

Expand Down Expand Up @@ -820,15 +817,12 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info)
allow_create, replace_required);

if (IS_ERR(sn)) {
err = PTR_ERR(sn);
sn = NULL;
}
if (!sn) {
/* If it is failed, discard just allocated
root, and then (in st_failure) stale node
in main tree.
*/
node_free(sfn);
err = PTR_ERR(sn);
goto st_failure;
}

Expand All @@ -843,10 +837,8 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info)

if (IS_ERR(sn)) {
err = PTR_ERR(sn);
sn = NULL;
}
if (!sn)
goto st_failure;
}
}

if (!fn->leaf) {
Expand Down

0 comments on commit e8c4b3f

Please sign in to comment.