From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org,
Jonathan Hunter <jonathanh@nvidia.com>,
Michael Turquette <mturquette@baylibre.com>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Thierry Reding <thierry.reding@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] clk/tegra: Delete an error message for a failed memory allocation in three functions
Date: Wed, 27 Sep 2017 18:53:10 +0200 [thread overview]
Message-ID: <9cc51853-c393-91e6-45d8-6516dde90366@users.sourceforge.net> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 27 Sep 2017 18:40:34 +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/tegra/clk-audio-sync.c | 4 +---
drivers/clk/tegra/clk-divider.c | 5 +----
drivers/clk/tegra/clk-periph-gate.c | 4 +---
3 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/clk/tegra/clk-audio-sync.c b/drivers/clk/tegra/clk-audio-sync.c
index 92d04ce2dee6..62a84c883dd4 100644
--- a/drivers/clk/tegra/clk-audio-sync.c
+++ b/drivers/clk/tegra/clk-audio-sync.c
@@ -62,10 +62,8 @@ struct clk *tegra_clk_register_sync_source(const char *name,
struct clk *clk;
sync = kzalloc(sizeof(*sync), GFP_KERNEL);
- if (!sync) {
- pr_err("%s: could not allocate sync source clk\n", __func__);
+ if (!sync)
return ERR_PTR(-ENOMEM);
- }
sync->rate = rate;
sync->max_rate = max_rate;
diff --git a/drivers/clk/tegra/clk-divider.c b/drivers/clk/tegra/clk-divider.c
index 16e0aee14773..5ee9423ccac2 100644
--- a/drivers/clk/tegra/clk-divider.c
+++ b/drivers/clk/tegra/clk-divider.c
@@ -156,11 +156,8 @@ struct clk *tegra_clk_register_divider(const char *name,
struct clk_init_data init;
divider = kzalloc(sizeof(*divider), GFP_KERNEL);
- if (!divider) {
- pr_err("%s: could not allocate fractional divider clk\n",
- __func__);
+ if (!divider)
return ERR_PTR(-ENOMEM);
- }
init.name = name;
init.ops = &tegra_clk_frac_div_ops;
diff --git a/drivers/clk/tegra/clk-periph-gate.c b/drivers/clk/tegra/clk-periph-gate.c
index 303ef32ee3f1..276cc4c59204 100644
--- a/drivers/clk/tegra/clk-periph-gate.c
+++ b/drivers/clk/tegra/clk-periph-gate.c
@@ -141,10 +141,8 @@ struct clk *tegra_clk_register_periph_gate(const char *name,
return ERR_PTR(-EINVAL);
gate = kzalloc(sizeof(*gate), GFP_KERNEL);
- if (!gate) {
- pr_err("%s: could not allocate periph gate clk\n", __func__);
+ if (!gate)
return ERR_PTR(-ENOMEM);
- }
init.name = name;
init.flags = flags;
--
2.14.2
next reply other threads:[~2017-09-27 16:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 16:53 SF Markus Elfring [this message]
2017-09-29 9:19 ` [PATCH] clk/tegra: Delete an error message for a failed memory allocation in three functions Peter De Schrijver
2017-11-02 8:19 ` 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=9cc51853-c393-91e6-45d8-6516dde90366@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=jonathanh@nvidia.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.com \
--cc=sboyd@codeaurora.org \
--cc=thierry.reding@gmail.com \
/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).