Commit b57ffac5 authored by Wei Yongjun's avatar Wei Yongjun Committed by Rafael J. Wysocki

cpufreq / intel_pstate: use vzalloc() instead of vmalloc()/memset(0)

Use vzalloc() instead of vmalloc() and memset(0).
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Acked-by: default avatarDirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 60e6726c
...@@ -709,10 +709,9 @@ static int __init intel_pstate_init(void) ...@@ -709,10 +709,9 @@ static int __init intel_pstate_init(void)
pr_info("Intel P-state driver initializing.\n"); 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) if (!all_cpu_data)
return -ENOMEM; return -ENOMEM;
memset(all_cpu_data, 0, sizeof(void *) * num_possible_cpus());
rc = cpufreq_register_driver(&intel_pstate_driver); rc = cpufreq_register_driver(&intel_pstate_driver);
if (rc) if (rc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment