X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Fmmtimer.c;h=e60a74c66e3dfa05c00eb45596829e77932ce5c1;hb=23eb68c569cdbaad1a88015be1d69c565cd3926a;hp=c09160383a5332c9635c4813215dabd9063bade8;hpb=2fd8507d14ef7af3ae05316b3277044cf6daa381;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c index c09160383a5..e60a74c66e3 100644 --- a/drivers/char/mmtimer.c +++ b/drivers/char/mmtimer.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -705,15 +706,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);