summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-xgene.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-09-26 21:19:19 +0200
committerStephen Boyd <sboyd@codeaurora.org>2017-11-13 17:39:47 -0800
commite335545f5d864c47768e932e08667480667d9e97 (patch)
treeba260a20848a34167389d619bbf42371ec2bd1df /drivers/clk/clk-xgene.c
parentbb208f211c152d3d398eed95b4e5e5d8345457cb (diff)
downloadlinux-e335545f5d864c47768e932e08667480667d9e97.tar.gz
linux-e335545f5d864c47768e932e08667480667d9e97.tar.bz2
linux-e335545f5d864c47768e932e08667480667d9e97.zip
clk: clk-xgene: 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/clk-xgene.c')
-rw-r--r--drivers/clk/clk-xgene.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c
index 4c75821a3933..3cc84a65f686 100644
--- a/drivers/clk/clk-xgene.c
+++ b/drivers/clk/clk-xgene.c
@@ -146,10 +146,8 @@ static struct clk *xgene_register_clk_pll(struct device *dev,
/* allocate the APM clock structure */
apmclk = kzalloc(sizeof(*apmclk), GFP_KERNEL);
- if (!apmclk) {
- pr_err("%s: could not allocate APM clk\n", __func__);
+ if (!apmclk)
return ERR_PTR(-ENOMEM);
- }
init.name = name;
init.ops = &xgene_clk_pll_ops;
@@ -650,10 +648,8 @@ static struct clk *xgene_register_clk(struct device *dev,
/* allocate the APM clock structure */
apmclk = kzalloc(sizeof(*apmclk), GFP_KERNEL);
- if (!apmclk) {
- pr_err("%s: could not allocate APM clk\n", __func__);
+ if (!apmclk)
return ERR_PTR(-ENOMEM);
- }
init.name = name;
init.ops = &xgene_clk_ops;