aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2010-01-15 15:49:56 -0500
committerPekka Enberg <penberg@cs.helsinki.fi>2010-01-22 11:33:36 -0500
commit7738dd9e8f2bc1c249e00c9c20e018448fac0084 (patch)
tree2127dd8ada9cbcf83169e3de823dfe640de0e83a /mm
parent84e554e6865c4f4ae84d38800cf270b9a67901cc (diff)
slub: remove impossible condition
`s' cannot be NULL if kmalloc_caches is not NULL. This conditional would trigger a NULL pointer on `s', anyway, since it is immediately derefernced if true. Acked-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm')
-rw-r--r--mm/slub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index bddae72f6f49..8fbb2fd70b64 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2641,7 +2641,7 @@ static noinline struct kmem_cache *dma_kmalloc_cache(int index, gfp_t flags)
2641 if (slab_state >= SYSFS) 2641 if (slab_state >= SYSFS)
2642 slabflags |= __SYSFS_ADD_DEFERRED; 2642 slabflags |= __SYSFS_ADD_DEFERRED;
2643 2643
2644 if (!s || !text || !kmem_cache_open(s, flags, text, 2644 if (!text || !kmem_cache_open(s, flags, text,
2645 realsize, ARCH_KMALLOC_MINALIGN, slabflags, NULL)) { 2645 realsize, ARCH_KMALLOC_MINALIGN, slabflags, NULL)) {
2646 s->size = 0; 2646 s->size = 0;
2647 kfree(text); 2647 kfree(text);