cpufreq: qoriq: Drop memory allocation error messages from qoriq_cpufreq_cpu_init()
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 15 Feb 2018 17:00:37 +0000 (18:00 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 27 Feb 2018 17:29:01 +0000 (18:29 +0100)
Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/qoriq-cpufreq.c

index 0562761a3dec586f09ab082d6639a76b910b98d6..ee3e3656485b4c3e29bab9dc5c5ce1a69fc40ada 100644 (file)
@@ -192,16 +192,12 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy)
        count = clk_hw_get_num_parents(hwclk);
 
        data->pclk = kcalloc(count, sizeof(struct clk *), GFP_KERNEL);
-       if (!data->pclk) {
-               pr_err("%s: no memory\n", __func__);
+       if (!data->pclk)
                goto err_nomem2;
-       }
 
        table = kcalloc(count + 1, sizeof(*table), GFP_KERNEL);
-       if (!table) {
-               pr_err("%s: no memory\n", __func__);
+       if (!table)
                goto err_pclk;
-       }
 
        for (i = 0; i < count; i++) {
                clk = clk_hw_get_parent_by_index(hwclk, i)->clk;