summaryrefslogtreecommitdiffstats
path: root/drivers/clk/mmp/clk-mix.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-09-26 22:25:38 +0200
committerStephen Boyd <sboyd@codeaurora.org>2017-11-13 17:40:11 -0800
commit1cc36f73005427c7a74b0fdf0177cd0bf981e9ff (patch)
tree60a81a4d4697f2ccdad1a889c7d0438f3da92072 /drivers/clk/mmp/clk-mix.c
parent62c73ed5bf6372bd8417897ea9dcaf1d50d50de6 (diff)
downloadop-kernel-dev-1cc36f73005427c7a74b0fdf0177cd0bf981e9ff.zip
op-kernel-dev-1cc36f73005427c7a74b0fdf0177cd0bf981e9ff.tar.gz
clk: mmp: Delete error messages for failed memory allocations
Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/mmp/clk-mix.c')
-rw-r--r--drivers/clk/mmp/clk-mix.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/clk/mmp/clk-mix.c b/drivers/clk/mmp/clk-mix.c
index c554833c..1ae532d 100644
--- a/drivers/clk/mmp/clk-mix.c
+++ b/drivers/clk/mmp/clk-mix.c
@@ -451,11 +451,8 @@ struct clk *mmp_clk_register_mix(struct device *dev,
size_t table_bytes;
mix = kzalloc(sizeof(*mix), GFP_KERNEL);
- if (!mix) {
- pr_err("%s:%s: could not allocate mmp mix clk\n",
- __func__, name);
+ if (!mix)
return ERR_PTR(-ENOMEM);
- }
init.name = name;
init.flags = flags | CLK_GET_RATE_NOCACHE;
@@ -468,8 +465,6 @@ struct clk *mmp_clk_register_mix(struct device *dev,
table_bytes = sizeof(*config->table) * config->table_size;
mix->table = kmemdup(config->table, table_bytes, GFP_KERNEL);
if (!mix->table) {
- pr_err("%s:%s: could not allocate mmp mix table\n",
- __func__, name);
kfree(mix);
return ERR_PTR(-ENOMEM);
}
@@ -481,8 +476,6 @@ struct clk *mmp_clk_register_mix(struct device *dev,
mix->mux_table = kmemdup(config->mux_table, table_bytes,
GFP_KERNEL);
if (!mix->mux_table) {
- pr_err("%s:%s: could not allocate mmp mix mux-table\n",
- __func__, name);
kfree(mix->table);
kfree(mix);
return ERR_PTR(-ENOMEM);
OpenPOWER on IntegriCloud