mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 06:33:34 +00:00
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>
This commit is contained in:
parent
84e554e686
commit
7738dd9e8f
@ -2641,7 +2641,7 @@ static noinline struct kmem_cache *dma_kmalloc_cache(int index, gfp_t flags)
|
|||||||
if (slab_state >= SYSFS)
|
if (slab_state >= SYSFS)
|
||||||
slabflags |= __SYSFS_ADD_DEFERRED;
|
slabflags |= __SYSFS_ADD_DEFERRED;
|
||||||
|
|
||||||
if (!s || !text || !kmem_cache_open(s, flags, text,
|
if (!text || !kmem_cache_open(s, flags, text,
|
||||||
realsize, ARCH_KMALLOC_MINALIGN, slabflags, NULL)) {
|
realsize, ARCH_KMALLOC_MINALIGN, slabflags, NULL)) {
|
||||||
s->size = 0;
|
s->size = 0;
|
||||||
kfree(text);
|
kfree(text);
|
||||||
|
Loading…
Reference in New Issue
Block a user