From: Zhao Jin Date: Fri, 26 Aug 2011 16:26:17 +0000 (+0800) Subject: slab, cleanup: remove unneeded return X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=42c8c99cd891184bf4bcf6f09d62c54e42599453;p=openwrt%2Fstaging%2Fblogic.git slab, cleanup: remove unneeded return The procedure ends right after the if-statement, so remove ``return''. Also move the last common statement outside. Signed-off-by: Zhao Jin Acked-by: David Rientjes Acked-by: Christoph Lameter Signed-off-by: Pekka Enberg --- diff --git a/mm/slab.c b/mm/slab.c index f0bd7857ab3b..806a754fad8e 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3693,13 +3693,12 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp, if (likely(ac->avail < ac->limit)) { STATS_INC_FREEHIT(cachep); - ac->entry[ac->avail++] = objp; - return; } else { STATS_INC_FREEMISS(cachep); cache_flusharray(cachep, ac); - ac->entry[ac->avail++] = objp; } + + ac->entry[ac->avail++] = objp; } /**