Skip to content

Commit

Permalink
cpufreq: qoriq: Drop memory allocation error messages from qoriq_cpuf…
Browse files Browse the repository at this point in the history
…req_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 <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
elfring authored and rafaeljw committed Feb 27, 2018
1 parent d430fb9 commit d6b96e4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/cpufreq/qoriq-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d6b96e4

Please sign in to comment.