summaryrefslogtreecommitdiffstats
path: root/mm/slab_common.c
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-08-23 07:52:41 +0000
committerVlastimil Babka <vbabka@suse.cz>2022-08-23 16:03:05 +0200
commit610f9c00ce6ed894caf9bb4feb3c026339150233 (patch)
tree402b93184f11e3b117923e74025e1d4244ca308c /mm/slab_common.c
parent1c23f9e627a7b412978b4e852793c5e3c3efc555 (diff)
downloadlinux-610f9c00ce6ed894caf9bb4feb3c026339150233.tar.bz2
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>
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r--mm/slab_common.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 17996649cfe3..0dfa3cfb6be5 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -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);