Skip to content

Commit 610f9c0

Browse files
ye xingchentehcaster
authored andcommitted
mm/slab_common: Remove the unneeded result variable
Return the value from __kmem_cache_shrink() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot <[email protected]> Signed-off-by: ye xingchen <[email protected]> Acked-by: Hyeonggon Yoo <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]>
1 parent 1c23f9e commit 610f9c0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

mm/slab_common.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -495,13 +495,9 @@ EXPORT_SYMBOL(kmem_cache_destroy);
495495
*/
496496
int kmem_cache_shrink(struct kmem_cache *cachep)
497497
{
498-
int ret;
499-
500-
501498
kasan_cache_shrink(cachep);
502-
ret = __kmem_cache_shrink(cachep);
503499

504-
return ret;
500+
return __kmem_cache_shrink(cachep);
505501
}
506502
EXPORT_SYMBOL(kmem_cache_shrink);
507503

0 commit comments

Comments
 (0)