diff mbox

[1/4] clk-u300: Delete an error message for a failed memory allocation in two functions

Message ID 786e8b0c-a208-8ced-a566-905bae6ca394@users.sourceforge.net (mailing list archive)
State Accepted, archived
Headers show

Commit Message

SF Markus Elfring Sept. 26, 2017, 6:21 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 26 Sep 2017 19:30:46 +0200

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>
---
 drivers/clk/clk-u300.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Comments

Stephen Boyd Nov. 14, 2017, 1:58 a.m. UTC | #1
On 09/26, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 26 Sep 2017 19:30:46 +0200
> 
> 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>
> ---

Applied to clk-next
diff mbox

Patch

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;