diff options
author | Andrew Morton <[email protected]> | 2014-10-09 15:25:58 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-10-09 22:25:50 -0400 |
commit | 3aa24f519e48e0db0ccf198d1b766a61d9463ce6 (patch) | |
tree | 103cfb79516e24316f5ac9790b08613032d8a884 | |
parent | bf3e2692468fe46eed57d18b3dd1af5b30049122 (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 <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/slab_common.c | 4 |
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 |