]> Git Repo - linux.git/commitdiff
[IA64-SN2][KJ] mmtimer.c-kzalloc
authorvignesh babu <[email protected]>
Tue, 8 May 2007 18:53:27 +0000 (11:53 -0700)
committerTony Luck <[email protected]>
Tue, 8 May 2007 18:53:27 +0000 (11:53 -0700)
Replacing kmalloc/memset combination with kzalloc.

Signed-off-by: vignesh babu <[email protected]>
Signed-off-by: Tony Luck <[email protected]>
drivers/char/mmtimer.c

index c09160383a5332c9635c4813215dabd9063bade8..6e55cfb9c65a3f03a12d0431040532cebdeb2e7c 100644 (file)
@@ -705,15 +705,13 @@ static int __init mmtimer_init(void)
        maxn++;
 
        /* 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) {
                printk(KERN_ERR "%s: failed to allocate memory for device\n",
                                MMTIMER_NAME);
                goto out3;
        }
 
-       memset(timers,0,(sizeof(mmtimer_t *)*maxn));
-
        /* Allocate mmtimer_t's for each online node */
        for_each_online_node(node) {
                timers[node] = kmalloc_node(sizeof(mmtimer_t)*NUM_COMPARATORS, GFP_KERNEL, node);
This page took 0.054361 seconds and 4 git commands to generate.