mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 00:30:53 +07:00
[IA64-SN2][KJ] mmtimer.c-kzalloc
Replacing kmalloc/memset combination with kzalloc. Signed-off-by: vignesh babu <vignesh.babu@wipro.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
parent
66761522a7
commit
1cfb9c94b6
@ -705,15 +705,13 @@ static int __init mmtimer_init(void)
|
|||||||
maxn++;
|
maxn++;
|
||||||
|
|
||||||
/* Allocate list of node ptrs to mmtimer_t's */
|
/* Allocate list of node ptrs to mmtimer_t's */
|
||||||
timers = kmalloc(sizeof(mmtimer_t *)*maxn, GFP_KERNEL);
|
timers = kzalloc(sizeof(mmtimer_t *)*maxn, GFP_KERNEL);
|
||||||
if (timers == NULL) {
|
if (timers == NULL) {
|
||||||
printk(KERN_ERR "%s: failed to allocate memory for device\n",
|
printk(KERN_ERR "%s: failed to allocate memory for device\n",
|
||||||
MMTIMER_NAME);
|
MMTIMER_NAME);
|
||||||
goto out3;
|
goto out3;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(timers,0,(sizeof(mmtimer_t *)*maxn));
|
|
||||||
|
|
||||||
/* Allocate mmtimer_t's for each online node */
|
/* Allocate mmtimer_t's for each online node */
|
||||||
for_each_online_node(node) {
|
for_each_online_node(node) {
|
||||||
timers[node] = kmalloc_node(sizeof(mmtimer_t)*NUM_COMPARATORS, GFP_KERNEL, node);
|
timers[node] = kmalloc_node(sizeof(mmtimer_t)*NUM_COMPARATORS, GFP_KERNEL, node);
|
||||||
|
Loading…
Reference in New Issue
Block a user