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 <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
1 parent 1c23f9e commit 610f9c0

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

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)