mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mm/slob.c: remove an unnecessary check for __GFP_ZERO
Current flow guarantees a valid pointer when handling the __GFP_ZERO case. So remove the unnecessary NULL pointer check. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Miles Chen <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: David Rientjes <[email protected]> Cc: Joonsoo Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
852d8be0ad
commit
9f88faee3f
1 changed files with 1 additions and 1 deletions
|
|
@ -330,7 +330,7 @@ static void *slob_alloc(size_t size, gfp_t gfp, int align, int node)
|
|||
BUG_ON(!b);
|
||||
spin_unlock_irqrestore(&slob_lock, flags);
|
||||
}
|
||||
if (unlikely((gfp & __GFP_ZERO) && b))
|
||||
if (unlikely(gfp & __GFP_ZERO))
|
||||
memset(b, 0, size);
|
||||
return b;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue