From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-clk@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Michael Turquette <mturquette@baylibre.com>,
Simon Horman <horms+renesas@verge.net.au>,
Stephen Boyd <sboyd@codeaurora.org>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH] clk/Renesas: Delete an error message for a failed memory allocation in three functions
Date: Mon, 25 Sep 2017 10:34:24 +0200 [thread overview]
Message-ID: <7fa950f5-01b5-fa9b-e4e9-4ed944f46e32@users.sourceforge.net> (raw)
In-Reply-To: <64106728.50RHrbMaf7@avalon>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 25 Sep 2017 10:10:51 +0200
The script "checkpatch.pl" pointed information out like the following.
WARNING: Possible unnecessary 'out of memory' message
Thus fix affected source code places.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/clk/renesas/clk-mstp.c | 5 +----
drivers/clk/renesas/clk-rcar-gen2.c | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/clk/renesas/clk-mstp.c b/drivers/clk/renesas/clk-mstp.c
index 500a9e4e03c4..c944cc421e30 100644
--- a/drivers/clk/renesas/clk-mstp.c
+++ b/drivers/clk/renesas/clk-mstp.c
@@ -156,10 +156,8 @@ static struct clk * __init cpg_mstp_clock_register(const char *name,
struct clk *clk;
clock = kzalloc(sizeof(*clock), GFP_KERNEL);
- if (!clock) {
- pr_err("%s: failed to allocate MSTP clock.\n", __func__);
+ if (!clock)
return ERR_PTR(-ENOMEM);
- }
init.name = name;
init.ops = &cpg_mstp_clock_ops;
@@ -196,7 +194,6 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
if (group == NULL || clks == NULL) {
kfree(group);
kfree(clks);
- pr_err("%s: failed to allocate group\n", __func__);
return;
}
diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index 0b2e56d0d94b..d14cbe1ca29a 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -423,7 +423,6 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np)
/* We're leaking memory on purpose, there's no point in cleaning
* up as the system won't boot anyway.
*/
- pr_err("%s: failed to allocate cpg\n", __func__);
return;
}
--
2.14.1
next prev parent reply other threads:[~2017-09-25 8:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <566ABCD9.1060404@users.sourceforge.net>
2016-09-14 19:56 ` [PATCH 0/4] clk/Renesas-MSTP: Fine-tuning for two function implementations SF Markus Elfring
2016-09-14 20:00 ` [PATCH 1/4] clk/Renesas-MSTP: Use kmalloc_array() in cpg_mstp_clocks_init() SF Markus Elfring
2016-09-15 19:11 ` Geert Uytterhoeven
2016-09-16 23:13 ` Stephen Boyd
2016-09-14 20:01 ` [PATCH 2/4] clk/Renesas-MSTP: Delete an error message for a failed memory allocation SF Markus Elfring
2016-09-15 19:07 ` Geert Uytterhoeven
2016-09-15 19:13 ` Laurent Pinchart
2016-09-15 19:41 ` Wolfram Sang
2016-09-15 20:17 ` SF Markus Elfring
2016-09-15 22:55 ` Laurent Pinchart
2016-09-16 5:21 ` SF Markus Elfring
2017-09-25 8:34 ` SF Markus Elfring [this message]
2017-09-25 10:02 ` [PATCH] clk/Renesas: Delete an error message for a failed memory allocation in three functions Geert Uytterhoeven
2016-09-14 20:03 ` [PATCH 3/4] clk/Renesas-MSTP: Less function calls in cpg_mstp_clocks_init() after error detection SF Markus Elfring
2016-09-15 19:11 ` Geert Uytterhoeven
2016-09-15 20:40 ` SF Markus Elfring
2016-09-15 20:48 ` Geert Uytterhoeven
2016-09-16 5:32 ` SF Markus Elfring
2016-09-14 20:04 ` [PATCH 4/4] clk/Renesas-MSTP: Rename jump labels in cpg_mstp_attach_dev() SF Markus Elfring
2016-09-15 19:18 ` Geert Uytterhoeven
2016-09-16 6:00 ` SF Markus Elfring
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=7fa950f5-01b5-fa9b-e4e9-4ed944f46e32@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=geert+renesas@glider.be \
--cc=horms+renesas@verge.net.au \
--cc=kernel-janitors@vger.kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
--cc=ulf.hansson@linaro.org \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).