Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1627205
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 8/8] clk: nomadik: Delete error messages for a failed memory allocation in two functions |
| Date | 2017-04-20 10:40 +0200 |
| Message-ID | <tyfN8-6Do-15@gated-at.bofh.it> (permalink) |
| References | <tyfDr-6zX-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 20 Apr 2017 10:04:00 +0200
The script "checkpatch.pl" pointed information out like the following.
WARNING: Possible unnecessary 'out of memory' message
Thus remove such statements here.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/clk/clk-nomadik.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
index 8d57ab8d6ed8..13ad6d1e5090 100644
--- a/drivers/clk/clk-nomadik.c
+++ b/drivers/clk/clk-nomadik.c
@@ -267,10 +267,8 @@ pll_clk_register(struct device *dev, const char *name,
}
pll = kzalloc(sizeof(*pll), GFP_KERNEL);
- if (!pll) {
- pr_err("%s: could not allocate PLL clk\n", __func__);
+ if (!pll)
return ERR_PTR(-ENOMEM);
- }
init.name = name;
init.ops = &pll_clk_ops;
@@ -356,11 +354,9 @@ src_clk_register(struct device *dev, const char *name,
struct clk_init_data init;
sclk = kzalloc(sizeof(*sclk), GFP_KERNEL);
- if (!sclk) {
- pr_err("could not allocate SRC clock %s\n",
- name);
+ if (!sclk)
return ERR_PTR(-ENOMEM);
- }
+
init.name = name;
init.ops = &src_clk_ops;
/* Do not force-disable the static SDRAM controller */
--
2.12.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/8] clk: Fine-tuning for ten function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-20 10:30 +0200
[PATCH 8/8] clk: nomadik: Delete error messages for a failed memory allocation in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-20 10:40 +0200
[PATCH 6/8] clk: Improve a size determination in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-20 10:40 +0200
Re: [PATCH 6/8] clk: Improve a size determination in two functions Stephen Boyd <sboyd@codeaurora.org> - 2017-04-22 04:50 +0200
[PATCH 7/8] clk: nomadik: Use seq_puts() in nomadik_src_clk_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-20 10:40 +0200
Re: [PATCH 7/8] clk: nomadik: Use seq_puts() in nomadik_src_clk_show() Stephen Boyd <sboyd@codeaurora.org> - 2017-04-22 04:50 +0200
csiph-web