projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf3e269
)
mm/slab_common.c: suppress warning
author
Andrew Morton
<
[email protected]
>
Thu, 9 Oct 2014 22:25:58 +0000
(15:25 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 10 Oct 2014 02:25:50 +0000
(22:25 -0400)
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]
>
mm/slab_common.c
patch
|
blob
|
history
diff --git
a/mm/slab_common.c
b/mm/slab_common.c
index d319502b24038b7ad0aee1023b88c5c6501fc39e..cabb842c4e7c8efa7840c8c700e7d6d51a4f498a 100644
(file)
--- 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