From: ye xingchen Date: Tue, 23 Aug 2022 07:52:41 +0000 (+0000) Subject: mm/slab_common: Remove the unneeded result variable X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=610f9c00ce6ed894caf9bb4feb3c026339150233;p=linux.git 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 Signed-off-by: ye xingchen Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka --- diff --git a/mm/slab_common.c b/mm/slab_common.c index 17996649cfe3e..0dfa3cfb6be58 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);