Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1738830
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] clk/Renesas: Delete an error message for a failed memory allocation in three functions |
| Date | 2017-09-25 10:40 +0200 |
| Message-ID | <utx5M-3Sb-9@gated-at.bofh.it> (permalink) |
| References | <qEuGl-43C-5@gated-at.bofh.it> <shKmv-2C4-35@gated-at.bofh.it> <shLiy-3dO-5@gated-at.bofh.it> <shNNo-4DQ-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] clk/Renesas: Delete an error message for a failed memory allocation in three functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-25 10:40 +0200 Re: [PATCH] clk/Renesas: Delete an error message for a failed memory allocation in three functions Geert Uytterhoeven <geert@linux-m68k.org> - 2017-09-25 12:10 +0200
csiph-web