From: Christoph Lameter Date: Sat, 16 Feb 2008 07:45:24 +0000 (-0800) Subject: slub: Remove useless checks in alloc_debug_processing X-Git-Tag: v2.6.25-rc4~107^2~7 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d692ef6dcd20da60786470654410e85f29c2ddd9;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Christoph Lameter --- diff --git a/mm/slub.c b/mm/slub.c index d7d0d866b6b..0a5a1001590 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 */