From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-clk@vger.kernel.org,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/4] clk-u300: Delete an error message for a failed memory allocation in two functions
Date: Tue, 26 Sep 2017 20:21:24 +0200 [thread overview]
Message-ID: <786e8b0c-a208-8ced-a566-905bae6ca394@users.sourceforge.net> (raw)
In-Reply-To: <a81e53f2-53ee-cf2d-1a0a-f1e3e24a5b9d@users.sourceforge.net>
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(-)
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;
--
2.14.1
next prev parent reply other threads:[~2017-09-26 18:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 18:20 [PATCH 0/4] U300 clock: Adjustments for three function implementations SF Markus Elfring
2017-09-26 18:21 ` SF Markus Elfring [this message]
2017-11-14 1:58 ` [PATCH 1/4] clk-u300: Delete an error message for a failed memory allocation in two functions Stephen Boyd
2017-09-26 18:22 ` [PATCH 2/4] clk-u300: Improve a size determination " SF Markus Elfring
2017-11-14 1:58 ` Stephen Boyd
2017-09-26 18:23 ` [PATCH 3/4] clk-u300: Add some spaces for better code readability SF Markus Elfring
2017-11-14 1:58 ` Stephen Boyd
2017-09-26 18:25 ` [PATCH 4/4] clk-u300: Fix a typo in two comment lines SF Markus Elfring
2017-11-14 1:58 ` Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=786e8b0c-a208-8ced-a566-905bae6ca394@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome