aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-13 04:03:43 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-05-13 19:39:28 -0400
commitb57ffac5e57bff33dde3cff35dff5c41876a6d12 (patch)
tree2bf1b2308e05ba9566cf61091e72167708d5a365 /drivers/cpufreq
parent60e6726c7bdec7fedae278ee3bf973ba988f2abf (diff)
cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0)
Use vzalloc() instead of vmalloc() and memset(0). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/intel_pstate.c3
1 files changed, 1 insertions, 2 deletions
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)
709 709
710 pr_info("Intel P-state driver initializing.\n"); 710 pr_info("Intel P-state driver initializing.\n");
711 711
712 all_cpu_data = vmalloc(sizeof(void *) * num_possible_cpus()); 712 all_cpu_data = vzalloc(sizeof(void *) * num_possible_cpus());
713 if (!all_cpu_data) 713 if (!all_cpu_data)
714 return -ENOMEM; 714 return -ENOMEM;
715 memset(all_cpu_data, 0, sizeof(void *) * num_possible_cpus());
716 715
717 rc = cpufreq_register_driver(&intel_pstate_driver); 716 rc = cpufreq_register_driver(&intel_pstate_driver);
718 if (rc) 717 if (rc)