summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2014-10-09 15:25:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-09 22:25:50 -0400
commit3aa24f519e48e0db0ccf198d1b766a61d9463ce6 (patch)
tree103cfb79516e24316f5ac9790b08613032d8a884 /mm
parentbf3e2692468fe46eed57d18b3dd1af5b30049122 (diff)
mm/slab_common.c: suppress warning
False positive: mm/slab_common.c: In function 'kmem_cache_create': mm/slab_common.c:204: warning: 's' may be used uninitialized in this function Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/slab_common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index d319502b2403..cabb842c4e7c 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -211,8 +211,10 @@ kmem_cache_create(const char *name, size_t size, size_t align,
mutex_lock(&slab_mutex);
err = kmem_cache_sanity_check(name, size);
- if (err)
+ if (err) {
+ s = NULL; /* suppress uninit var warning */
goto out_unlock;
+ }
/*
* Some allocators will constraint the set of valid flags to a subset