From b07cd8575edccf4f58c951885c6c82f869ce89d9 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 7 May 2008 19:55:59 +0400 Subject: [PATCH] --- yaml --- r: 102732 b: refs/heads/master c: a3538b19a6d226f9d3d9b18865468370009dec55 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/mac80211/mesh.c | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index b98b626638de..780160c3f9b3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3282aea9ea5644a5b0161ad0fbd70fbf1099a470 +refs/heads/master: a3538b19a6d226f9d3d9b18865468370009dec55 diff --git a/trunk/net/mac80211/mesh.c b/trunk/net/mac80211/mesh.c index ca81d0065eb8..cbce001f8f23 100644 --- a/trunk/net/mac80211/mesh.c +++ b/trunk/net/mac80211/mesh.c @@ -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; @@ -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++) { @@ -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; }