Commit 0fd33116 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Greg Kroah-Hartman

arch_topology: Remove error messages on out-of-memory conditions

There is no need to print error messages if kcalloc() or
alloc_cpumask_var() fail, as the memory allocation core already takes
care of that.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20190527122703.6303-1-geert+renesas@glider.beSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 56f3364a
...@@ -137,7 +137,6 @@ bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu) ...@@ -137,7 +137,6 @@ bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu)
sizeof(*raw_capacity), sizeof(*raw_capacity),
GFP_KERNEL); GFP_KERNEL);
if (!raw_capacity) { if (!raw_capacity) {
pr_err("cpu_capacity: failed to allocate memory for raw capacities\n");
cap_parsing_failed = true; cap_parsing_failed = true;
return false; return false;
} }
...@@ -217,10 +216,8 @@ static int __init register_cpufreq_notifier(void) ...@@ -217,10 +216,8 @@ static int __init register_cpufreq_notifier(void)
if (!acpi_disabled || !raw_capacity) if (!acpi_disabled || !raw_capacity)
return -EINVAL; return -EINVAL;
if (!alloc_cpumask_var(&cpus_to_visit, GFP_KERNEL)) { if (!alloc_cpumask_var(&cpus_to_visit, GFP_KERNEL))
pr_err("cpu_capacity: failed to allocate memory for cpus_to_visit\n");
return -ENOMEM; return -ENOMEM;
}
cpumask_copy(cpus_to_visit, cpu_possible_mask); cpumask_copy(cpus_to_visit, cpu_possible_mask);
......
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