summaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-04-18 04:12:32 -0400
committerStephen Boyd <sboyd@codeaurora.org>2017-04-19 13:45:52 -0400
commit840e56326fd90a435644ee0eeba99f4cddd31759 (patch)
tree02697392f164456891208fe2ddfed0568f744d65 /drivers/clk
parent8d9bdc46c780325414af7f09827c78c69f9b1e3d (diff)
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: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/hisilicon/clk.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/clk/hisilicon/clk.c b/drivers/clk/hisilicon/clk.c
index 7e1e22eb5689..b73c1dfae7f1 100644
--- a/drivers/clk/hisilicon/clk.c
+++ b/drivers/clk/hisilicon/clk.c
@@ -81,16 +81,14 @@ struct hisi_clock_data *hisi_clk_init(struct device_node *np,
81 } 81 }
82 82
83 clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL); 83 clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL);
84 if (!clk_data) { 84 if (!clk_data)
85 pr_err("%s: could not allocate clock data\n", __func__);
86 goto err; 85 goto err;
87 } 86
88 clk_data->base = base; 87 clk_data->base = base;
89 clk_table = kcalloc(nr_clks, sizeof(*clk_table), GFP_KERNEL); 88 clk_table = kcalloc(nr_clks, sizeof(*clk_table), GFP_KERNEL);
90 if (!clk_table) { 89 if (!clk_table)
91 pr_err("%s: could not allocate clock lookup table\n", __func__);
92 goto err_data; 90 goto err_data;
93 } 91
94 clk_data->clk_data.clks = clk_table; 92 clk_data->clk_data.clks = clk_table;
95 clk_data->clk_data.clk_num = nr_clks; 93 clk_data->clk_data.clk_num = nr_clks;
96 of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data->clk_data); 94 of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data->clk_data);