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>
This commit is contained in:
ye xingchen 2022-08-23 07:52:41 +00:00 committed by Vlastimil Babka
parent 1c23f9e627
commit 610f9c00ce
1 changed files with 1 additions and 5 deletions

View File

@ -495,13 +495,9 @@ EXPORT_SYMBOL(kmem_cache_destroy);
*/
int kmem_cache_shrink(struct kmem_cache *cachep)
{
int ret;
kasan_cache_shrink(cachep);
ret = __kmem_cache_shrink(cachep);
return ret;
return __kmem_cache_shrink(cachep);
}
EXPORT_SYMBOL(kmem_cache_shrink);