Commit 840e5632 authored by Markus Elfring's avatar Markus Elfring Committed by Stephen Boyd

clk: hisilicon: Delete error messages for failed memory allocations in hisi_clk_init()

The script "checkpatch.pl" pointed information out like the following.

WARNING: Possible unnecessary 'out of memory' message

Thus remove such statements here.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 8d9bdc46
...@@ -81,16 +81,14 @@ struct hisi_clock_data *hisi_clk_init(struct device_node *np, ...@@ -81,16 +81,14 @@ struct hisi_clock_data *hisi_clk_init(struct device_node *np,
} }
clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL); clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL);
if (!clk_data) { if (!clk_data)
pr_err("%s: could not allocate clock data\n", __func__);
goto err; goto err;
}
clk_data->base = base; clk_data->base = base;
clk_table = kcalloc(nr_clks, sizeof(*clk_table), GFP_KERNEL); clk_table = kcalloc(nr_clks, sizeof(*clk_table), GFP_KERNEL);
if (!clk_table) { if (!clk_table)
pr_err("%s: could not allocate clock lookup table\n", __func__);
goto err_data; goto err_data;
}
clk_data->clk_data.clks = clk_table; clk_data->clk_data.clks = clk_table;
clk_data->clk_data.clk_num = nr_clks; clk_data->clk_data.clk_num = nr_clks;
of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data->clk_data); of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data->clk_data);
......
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