Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102732
b: refs/heads/master
c: a3538b1
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and John W. Linville committed May 22, 2008
1 parent 04cbbdd commit b07cd85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 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: 3282aea9ea5644a5b0161ad0fbd70fbf1099a470
refs/heads/master: a3538b19a6d226f9d3d9b18865468370009dec55
16 changes: 4 additions & 12 deletions trunk/net/mac80211/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,20 +350,15 @@ struct mesh_table *mesh_table_grow(struct mesh_table *tbl)
struct mesh_table *newtbl;
struct hlist_head *oldhash;
struct hlist_node *p, *q;
int err = 0;
int i;

if (atomic_read(&tbl->entries)
< tbl->mean_chain_len * (tbl->hash_mask + 1)) {
err = -EPERM;
< tbl->mean_chain_len * (tbl->hash_mask + 1))
goto endgrow;
}

newtbl = mesh_table_alloc(tbl->size_order + 1);
if (!newtbl) {
err = -ENOMEM;
if (!newtbl)
goto endgrow;
}

newtbl->free_node = tbl->free_node;
newtbl->mean_chain_len = tbl->mean_chain_len;
Expand All @@ -376,11 +371,7 @@ struct mesh_table *mesh_table_grow(struct mesh_table *tbl)
if (tbl->copy_node(p, newtbl) < 0)
goto errcopy;

endgrow:
if (err)
return NULL;
else
return newtbl;
return newtbl;

errcopy:
for (i = 0; i <= newtbl->hash_mask; i++) {
Expand All @@ -390,6 +381,7 @@ struct mesh_table *mesh_table_grow(struct mesh_table *tbl)
kfree(newtbl->hash_buckets);
kfree(newtbl->hashwlock);
kfree(newtbl);
endgrow:
return NULL;
}

Expand Down

0 comments on commit b07cd85

Please sign in to comment.