clk: clk-xgene: Delete error messages for failed memory allocations
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 26 Sep 2017 19:19:19 +0000 (21:19 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 14 Nov 2017 01:39:47 +0000 (17:39 -0800)
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>
drivers/clk/clk-xgene.c

index 4c75821..3cc84a6 100644 (file)
@@ -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;