From: Wei Yongjun Date: Mon, 13 May 2013 08:03:43 +0000 (+0000) Subject: cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0) X-Git-Tag: MMI-PSA29.97-13-9~14380^2~1^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b57ffac5e57bff33dde3cff35dff5c41876a6d12;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0) Use vzalloc() instead of vmalloc() and memset(0). Signed-off-by: Wei Yongjun Acked-by: Viresh Kumar Acked-by: Dirk Brandewie Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 0cc7d60525ac..9c36ace92a39 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -709,10 +709,9 @@ static int __init intel_pstate_init(void) pr_info("Intel P-state driver initializing.\n"); - all_cpu_data = vmalloc(sizeof(void *) * num_possible_cpus()); + all_cpu_data = vzalloc(sizeof(void *) * num_possible_cpus()); if (!all_cpu_data) return -ENOMEM; - memset(all_cpu_data, 0, sizeof(void *) * num_possible_cpus()); rc = cpufreq_register_driver(&intel_pstate_driver); if (rc)