* [PATCH] clk/spear: Delete five error messages for a failed memory allocation
@ 2017-09-27 16:15 SF Markus Elfring
2017-09-27 17:42 ` Viresh Kumar
2017-11-14 1:59 ` Stephen Boyd
0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-09-27 16:15 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 27 Sep 2017 18:00:21 +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/spear/clk-aux-synth.c | 4 +---
drivers/clk/spear/clk-frac-synth.c | 4 +---
drivers/clk/spear/clk-gpt-synth.c | 4 +---
drivers/clk/spear/clk-vco-pll.c | 8 ++------
4 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/clk/spear/clk-aux-synth.c b/drivers/clk/spear/clk-aux-synth.c
index f271c350ef94..ee7a7c043e3b 100644
--- a/drivers/clk/spear/clk-aux-synth.c
+++ b/drivers/clk/spear/clk-aux-synth.c
@@ -149,10 +149,8 @@ struct clk *clk_register_aux(const char *aux_name, const char *gate_name,
}
aux = kzalloc(sizeof(*aux), GFP_KERNEL);
- if (!aux) {
- pr_err("could not allocate aux clk\n");
+ if (!aux)
return ERR_PTR(-ENOMEM);
- }
/* struct clk_aux assignments */
if (!masks)
diff --git a/drivers/clk/spear/clk-frac-synth.c b/drivers/clk/spear/clk-frac-synth.c
index 58d678b5b40a..c48f3ed2d570 100644
--- a/drivers/clk/spear/clk-frac-synth.c
+++ b/drivers/clk/spear/clk-frac-synth.c
@@ -136,10 +136,8 @@ struct clk *clk_register_frac(const char *name, const char *parent_name,
}
frac = kzalloc(sizeof(*frac), GFP_KERNEL);
- if (!frac) {
- pr_err("could not allocate frac clk\n");
+ if (!frac)
return ERR_PTR(-ENOMEM);
- }
/* struct clk_frac assignments */
frac->reg = reg;
diff --git a/drivers/clk/spear/clk-gpt-synth.c b/drivers/clk/spear/clk-gpt-synth.c
index 1a722e99e76e..6e95d7f3ade9 100644
--- a/drivers/clk/spear/clk-gpt-synth.c
+++ b/drivers/clk/spear/clk-gpt-synth.c
@@ -125,10 +125,8 @@ struct clk *clk_register_gpt(const char *name, const char *parent_name, unsigned
}
gpt = kzalloc(sizeof(*gpt), GFP_KERNEL);
- if (!gpt) {
- pr_err("could not allocate gpt clk\n");
+ if (!gpt)
return ERR_PTR(-ENOMEM);
- }
/* struct clk_gpt assignments */
gpt->reg = reg;
diff --git a/drivers/clk/spear/clk-vco-pll.c b/drivers/clk/spear/clk-vco-pll.c
index dc21ca4601aa..e06b821fa60e 100644
--- a/drivers/clk/spear/clk-vco-pll.c
+++ b/drivers/clk/spear/clk-vco-pll.c
@@ -292,16 +292,12 @@ struct clk *clk_register_vco_pll(const char *vco_name, const char *pll_name,
}
vco = kzalloc(sizeof(*vco), GFP_KERNEL);
- if (!vco) {
- pr_err("could not allocate vco clk\n");
+ if (!vco)
return ERR_PTR(-ENOMEM);
- }
pll = kzalloc(sizeof(*pll), GFP_KERNEL);
- if (!pll) {
- pr_err("could not allocate pll clk\n");
+ if (!pll)
goto free_vco;
- }
/* struct clk_vco assignments */
vco->mode_reg = mode_reg;
--
2.14.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] clk/spear: Delete five error messages for a failed memory allocation
2017-09-27 16:15 [PATCH] clk/spear: Delete five error messages for a failed memory allocation SF Markus Elfring
@ 2017-09-27 17:42 ` Viresh Kumar
2017-11-14 1:59 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2017-09-27 17:42 UTC (permalink / raw)
To: linux-arm-kernel
On 27-09-17, 18:15, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Sep 2017 18:00:21 +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/spear/clk-aux-synth.c | 4 +---
> drivers/clk/spear/clk-frac-synth.c | 4 +---
> drivers/clk/spear/clk-gpt-synth.c | 4 +---
> drivers/clk/spear/clk-vco-pll.c | 8 ++------
> 4 files changed, 5 insertions(+), 15 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] clk/spear: Delete five error messages for a failed memory allocation
2017-09-27 16:15 [PATCH] clk/spear: Delete five error messages for a failed memory allocation SF Markus Elfring
2017-09-27 17:42 ` Viresh Kumar
@ 2017-11-14 1:59 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2017-11-14 1:59 UTC (permalink / raw)
To: linux-arm-kernel
On 09/27, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Sep 2017 18:00:21 +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>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-14 1:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-27 16:15 [PATCH] clk/spear: Delete five error messages for a failed memory allocation SF Markus Elfring
2017-09-27 17:42 ` Viresh Kumar
2017-11-14 1:59 ` Stephen Boyd
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).