* [PATCH] cpufreq: qoriq: Delete two error messages for a failed memory allocation in qoriq_cpufreq_cpu_init()
@ 2018-02-15 17:08 SF Markus Elfring
2018-02-19 3:44 ` Viresh Kumar
0 siblings, 1 reply; 2+ messages in thread
From: SF Markus Elfring @ 2018-02-15 17:08 UTC (permalink / raw)
To: linux-pm, Rafael J. Wysocki, Viresh Kumar; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 15 Feb 2018 18:00:37 +0100
Omit extra messages for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/cpufreq/qoriq-cpufreq.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
index 0562761a3dec..ee3e3656485b 100644
--- a/drivers/cpufreq/qoriq-cpufreq.c
+++ b/drivers/cpufreq/qoriq-cpufreq.c
@@ -192,16 +192,12 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy)
count = clk_hw_get_num_parents(hwclk);
data->pclk = kcalloc(count, sizeof(struct clk *), GFP_KERNEL);
- if (!data->pclk) {
- pr_err("%s: no memory\n", __func__);
+ if (!data->pclk)
goto err_nomem2;
- }
table = kcalloc(count + 1, sizeof(*table), GFP_KERNEL);
- if (!table) {
- pr_err("%s: no memory\n", __func__);
+ if (!table)
goto err_pclk;
- }
for (i = 0; i < count; i++) {
clk = clk_hw_get_parent_by_index(hwclk, i)->clk;
--
2.16.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] cpufreq: qoriq: Delete two error messages for a failed memory allocation in qoriq_cpufreq_cpu_init()
2018-02-15 17:08 [PATCH] cpufreq: qoriq: Delete two error messages for a failed memory allocation in qoriq_cpufreq_cpu_init() SF Markus Elfring
@ 2018-02-19 3:44 ` Viresh Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2018-02-19 3:44 UTC (permalink / raw)
To: SF Markus Elfring; +Cc: linux-pm, Rafael J. Wysocki, LKML, kernel-janitors
On 15-02-18, 18:08, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 15 Feb 2018 18:00:37 +0100
>
> Omit extra messages for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/cpufreq/qoriq-cpufreq.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
> index 0562761a3dec..ee3e3656485b 100644
> --- a/drivers/cpufreq/qoriq-cpufreq.c
> +++ b/drivers/cpufreq/qoriq-cpufreq.c
> @@ -192,16 +192,12 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy)
> count = clk_hw_get_num_parents(hwclk);
>
> data->pclk = kcalloc(count, sizeof(struct clk *), GFP_KERNEL);
> - if (!data->pclk) {
> - pr_err("%s: no memory\n", __func__);
> + if (!data->pclk)
> goto err_nomem2;
> - }
>
> table = kcalloc(count + 1, sizeof(*table), GFP_KERNEL);
> - if (!table) {
> - pr_err("%s: no memory\n", __func__);
> + if (!table)
> goto err_pclk;
> - }
>
> for (i = 0; i < count; i++) {
> clk = clk_hw_get_parent_by_index(hwclk, i)->clk;
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-19 3:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15 17:08 [PATCH] cpufreq: qoriq: Delete two error messages for a failed memory allocation in qoriq_cpufreq_cpu_init() SF Markus Elfring
2018-02-19 3:44 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®