OSDN Git Service

arch_topology: Remove error messages on out-of-memory conditions
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 27 May 2019 12:27:03 +0000 (14:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2019 18:10:18 +0000 (20:10 +0200)
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: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20190527122703.6303-1-geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/arch_topology.c

index 1739d7e..8486c39 100644 (file)
@@ -137,7 +137,6 @@ bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu)
                                               sizeof(*raw_capacity),
                                               GFP_KERNEL);
                        if (!raw_capacity) {
-                               pr_err("cpu_capacity: failed to allocate memory for raw capacities\n");
                                cap_parsing_failed = true;
                                return false;
                        }
@@ -217,10 +216,8 @@ static int __init register_cpufreq_notifier(void)
        if (!acpi_disabled || !raw_capacity)
                return -EINVAL;
 
-       if (!alloc_cpumask_var(&cpus_to_visit, GFP_KERNEL)) {
-               pr_err("cpu_capacity: failed to allocate memory for cpus_to_visit\n");
+       if (!alloc_cpumask_var(&cpus_to_visit, GFP_KERNEL))
                return -ENOMEM;
-       }
 
        cpumask_copy(cpus_to_visit, cpu_possible_mask);