mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-08 12:28:27 +00:00
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>
This commit is contained in:
parent
60e6726c7b
commit
b57ffac5e5
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user