Skip to content

Commit 3aa24f5

Browse files
akpm00torvalds
authored andcommitted
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]>
1 parent bf3e269 commit 3aa24f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mm/slab_common.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,10 @@ kmem_cache_create(const char *name, size_t size, size_t align,
211211
mutex_lock(&slab_mutex);
212212

213213
err = kmem_cache_sanity_check(name, size);
214-
if (err)
214+
if (err) {
215+
s = NULL; /* suppress uninit var warning */
215216
goto out_unlock;
217+
}
216218

217219
/*
218220
* Some allocators will constraint the set of valid flags to a subset

0 commit comments

Comments
 (0)