From: Viresh Kumar <viresh.kumar@linaro.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: linux-pm@vger.kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] cpufreq: qoriq: Delete two error messages for a failed memory allocation in qoriq_cpufreq_cpu_init()
Date: Mon, 19 Feb 2018 09:14:43 +0530 [thread overview]
Message-ID: <20180219034443.GL28462@vireshk-i7> (raw)
In-Reply-To: <650e783f-7b4c-17b5-3bc7-56e3058a95d1@users.sourceforge.net>
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
prev parent reply other threads:[~2018-02-19 3:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 17:08 SF Markus Elfring
2018-02-19 3:44 ` Viresh Kumar [this message]
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=20180219034443.GL28462@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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
all inboxes | Powered by JetHome®