Skip to content

Commit

Permalink
slab, cleanup: remove unneeded return
Browse files Browse the repository at this point in the history
The procedure ends right after the if-statement, so remove ``return''.
Also move the last common statement outside.

Signed-off-by: Zhao Jin <cronozhj@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
  • Loading branch information
Zhao Jin authored and Pekka Enberg committed Jan 23, 2012
1 parent dcd6c92 commit 42c8c99
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 42c8c99

Please sign in to comment.