aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Elfring2017-09-26 19:30:46 +0200
committerStephen Boyd2017-11-13 17:38:39 -0800
commitde8cd467e413906265eaa1f8af8d2da0f0d63c40 (patch)
tree978ed595459e01e34d75522ff96fffef91be67c9
parent1e28733e315e9ede15896600a475408d2a203a32 (diff)
clk: clk-u300: 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>
-rw-r--r--drivers/clk/clk-u300.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/clk/clk-u300.c b/drivers/clk/clk-u300.c
index ec8aafda6e24..e524c3775264 100644
--- a/drivers/clk/clk-u300.c
+++ b/drivers/clk/clk-u300.c
@@ -703,11 +703,9 @@ syscon_clk_register(struct device *dev, const char *name,
int ret;
sclk = kzalloc(sizeof(struct clk_syscon), GFP_KERNEL);
- if (!sclk) {
- pr_err("could not allocate syscon clock %s\n",
- name);
+ if (!sclk)
return ERR_PTR(-ENOMEM);
- }
+
init.name = name;
init.ops = &syscon_clk_ops;
init.flags = flags;
@@ -1124,11 +1122,9 @@ mclk_clk_register(struct device *dev, const char *name,
int ret;
mclk = kzalloc(sizeof(struct clk_mclk), GFP_KERNEL);
- if (!mclk) {
- pr_err("could not allocate MMC/SD clock %s\n",
- name);
+ if (!mclk)
return ERR_PTR(-ENOMEM);
- }
+
init.name = "mclk";
init.ops = &mclk_ops;
init.flags = 0;