mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-07 15:15:29 +00:00
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>
This commit is contained in:
parent
bf3e269246
commit
3aa24f519e
1 changed files with 3 additions and 1 deletions
|
@ -211,8 +211,10 @@ kmem_cache_create(const char *name, size_t size, size_t align,
|
||||||
mutex_lock(&slab_mutex);
|
mutex_lock(&slab_mutex);
|
||||||
|
|
||||||
err = kmem_cache_sanity_check(name, size);
|
err = kmem_cache_sanity_check(name, size);
|
||||||
if (err)
|
if (err) {
|
||||||
|
s = NULL; /* suppress uninit var warning */
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some allocators will constraint the set of valid flags to a subset
|
* Some allocators will constraint the set of valid flags to a subset
|
||||||
|
|
Loading…
Add table
Reference in a new issue