mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@linaro.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: linux-clk@vger.kernel.org,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] clk: hisilicon: Delete an error message for a failed memory allocation in hisi_register_clkgate_sep()
Date: Wed, 27 Sep 2017 14:52:17 +0800	[thread overview]
Message-ID: <20170927065217.GC8173@leoy-ThinkPad-T440> (raw)
In-Reply-To: <920f1461-2c2a-430f-28ef-18af18788889@users.sourceforge.net>

Hi Markus,

On Tue, Sep 26, 2017 at 10:05:59PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 26 Sep 2017 22:00:05 +0200
> 
> Omit an extra message 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>

This patch is good for me, it's true that below error log senstence is
redundant with its caller hisi_clk_register_gate_sep().

Reviewed-by: Leo Yan <leo.yan@linaro.org>

> ---
>  drivers/clk/hisilicon/clkgate-separated.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/clk/hisilicon/clkgate-separated.c b/drivers/clk/hisilicon/clkgate-separated.c
> index 7908bc3c9ec7..f028bcffe12c 100644
> --- a/drivers/clk/hisilicon/clkgate-separated.c
> +++ b/drivers/clk/hisilicon/clkgate-separated.c
> @@ -105,10 +105,8 @@ struct clk *hisi_register_clkgate_sep(struct device *dev, const char *name,
>  	struct clk_init_data init;
>  
>  	sclk = kzalloc(sizeof(*sclk), GFP_KERNEL);
> -	if (!sclk) {
> -		pr_err("%s: fail to allocate separated gated clk\n", __func__);
> +	if (!sclk)
>  		return ERR_PTR(-ENOMEM);
> -	}
>  
>  	init.name = name;
>  	init.ops = &clkgate_separated_ops;
> -- 
> 2.14.1
> 

  reply	other threads:[~2017-09-27  6:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26 20:05 SF Markus Elfring
2017-09-27  6:52 ` Leo Yan [this message]
2017-11-11  2:45 ` Stephen Boyd

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=20170927065217.GC8173@leoy-ThinkPad-T440 \
    --to=leo.yan@linaro.org \
    --cc=elfring@users.sourceforge.net \
    --cc=haojian.zhuang@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    /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

Powered by JetHome