[PATCH] kernel core: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
304e61e6fb
commit
4668edc334
@@ -324,12 +324,11 @@ static int refill_pi_state_cache(void)
|
||||
if (likely(current->pi_state_cache))
|
||||
return 0;
|
||||
|
||||
pi_state = kmalloc(sizeof(*pi_state), GFP_KERNEL);
|
||||
pi_state = kzalloc(sizeof(*pi_state), GFP_KERNEL);
|
||||
|
||||
if (!pi_state)
|
||||
return -ENOMEM;
|
||||
|
||||
memset(pi_state, 0, sizeof(*pi_state));
|
||||
INIT_LIST_HEAD(&pi_state->list);
|
||||
/* pi_mutex gets initialized later */
|
||||
pi_state->owner = NULL;
|
||||
|
Reference in New Issue
Block a user