summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/qoriq-cpufreq.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-02-15 18:00:37 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-02-27 18:29:01 +0100
commitd6b96e4706df9791f7c4915a567c498b0aafb659 (patch)
tree201ea77fef8f2c708e1c0d0d968fe306820e072b /drivers/cpufreq/qoriq-cpufreq.c
parentd430fb998451eb99f5592c003598e8324976f0cd (diff)
cpufreq: qoriq: Drop memory allocation error messages from qoriq_cpufreq_cpu_init()
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>
Diffstat (limited to 'drivers/cpufreq/qoriq-cpufreq.c')
-rw-r--r--drivers/cpufreq/qoriq-cpufreq.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
index 0562761a3dec..ee3e3656485b 100644
--- a/drivers/cpufreq/qoriq-cpufreq.c
+++ b/drivers/cpufreq/qoriq-cpufreq.c
@@ -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;