[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe677e31-35b3-fc18-e63a-0f3d24c9f926@users.sourceforge.net>
Date: Wed, 27 Sep 2017 21:39:48 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-clk@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...eaurora.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 1/2] clk/versatile: Delete two error messages for a failed
memory allocation in icst_clk_setup()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 27 Sep 2017 21:21:23 +0200
Omit extra messages for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/clk/versatile/clk-icst.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c
index 09fbe66f1f11..20ab4ceffb28 100644
--- a/drivers/clk/versatile/clk-icst.c
+++ b/drivers/clk/versatile/clk-icst.c
@@ -360,15 +360,12 @@ static struct clk *icst_clk_setup(struct device *dev,
struct icst_params *pclone;
icst = kzalloc(sizeof(struct clk_icst), GFP_KERNEL);
- if (!icst) {
- pr_err("could not allocate ICST clock!\n");
+ if (!icst)
return ERR_PTR(-ENOMEM);
- }
pclone = kmemdup(desc->params, sizeof(*pclone), GFP_KERNEL);
if (!pclone) {
kfree(icst);
- pr_err("could not clone ICST params\n");
return ERR_PTR(-ENOMEM);
}
--
2.14.2
Powered by blists - more mailing lists