diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-02-16 08:45:24 +0100 |
---|---|---|
committer | Christoph Lameter <clameter@sgi.com> | 2008-03-03 21:22:31 +0100 |
commit | d692ef6dcd20da60786470654410e85f29c2ddd9 (patch) | |
tree | a38e03581a829bbd978c7bc03016e275bcf4c774 /mm/slub.c | |
parent | slub: Remove objsize check in kmem_cache_flags() (diff) | |
download | linux-d692ef6dcd20da60786470654410e85f29c2ddd9.tar.xz linux-d692ef6dcd20da60786470654410e85f29c2ddd9.zip |
slub: Remove useless checks in alloc_debug_processing
Alloc debug processing is never called with a NULL object pointer.
No reason to check for NULL.
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Diffstat (limited to '')
-rw-r--r-- | mm/slub.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c index d7d0d866b6b2..0a5a1001590b 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -852,7 +852,7 @@ static int alloc_debug_processing(struct kmem_cache *s, struct page *page, if (!check_slab(s, page)) goto bad; - if (object && !on_freelist(s, page, object)) { + if (!on_freelist(s, page, object)) { object_err(s, page, object, "Object already allocated"); goto bad; } @@ -862,7 +862,7 @@ static int alloc_debug_processing(struct kmem_cache *s, struct page *page, goto bad; } - if (object && !check_object(s, page, object, 0)) + if (!check_object(s, page, object, 0)) goto bad; /* Success perform special debug activities for allocs */ |