diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-02-16 02:45:24 -0500 |
---|---|---|
committer | Christoph Lameter <clameter@sgi.com> | 2008-03-03 15:22:31 -0500 |
commit | d692ef6dcd20da60786470654410e85f29c2ddd9 (patch) | |
tree | a38e03581a829bbd978c7bc03016e275bcf4c774 /mm/slub.c | |
parent | e153362a50a34439718a938a851bba977116e19a (diff) |
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 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -852,7 +852,7 @@ static int alloc_debug_processing(struct kmem_cache *s, struct page *page, | |||
852 | if (!check_slab(s, page)) | 852 | if (!check_slab(s, page)) |
853 | goto bad; | 853 | goto bad; |
854 | 854 | ||
855 | if (object && !on_freelist(s, page, object)) { | 855 | if (!on_freelist(s, page, object)) { |
856 | object_err(s, page, object, "Object already allocated"); | 856 | object_err(s, page, object, "Object already allocated"); |
857 | goto bad; | 857 | goto bad; |
858 | } | 858 | } |
@@ -862,7 +862,7 @@ static int alloc_debug_processing(struct kmem_cache *s, struct page *page, | |||
862 | goto bad; | 862 | goto bad; |
863 | } | 863 | } |
864 | 864 | ||
865 | if (object && !check_object(s, page, object, 0)) | 865 | if (!check_object(s, page, object, 0)) |
866 | goto bad; | 866 | goto bad; |
867 | 867 | ||
868 | /* Success perform special debug activities for allocs */ | 868 | /* Success perform special debug activities for allocs */ |