Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752070AbdI0GwZ (ORCPT ); Wed, 27 Sep 2017 02:52:25 -0400 Received: from mail-pg0-f46.google.com ([74.125.83.46]:57244 "EHLO mail-pg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751471AbdI0GwW (ORCPT ); Wed, 27 Sep 2017 02:52:22 -0400 X-Google-Smtp-Source: AOwi7QDpTv6UU9xfSO/6D1WlZQa1AeWJtpDTnyVSfL/6nJqKn22wmqgWPfyXNyklsUDwqZn7XoFJrQ== Date: Wed, 27 Sep 2017 14:52:17 +0800 From: Leo Yan To: SF Markus Elfring Cc: linux-clk@vger.kernel.org, Haojian Zhuang , Michael Turquette , Stephen Boyd , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] clk: hisilicon: Delete an error message for a failed memory allocation in hisi_register_clkgate_sep() Message-ID: <20170927065217.GC8173@leoy-ThinkPad-T440> References: <920f1461-2c2a-430f-28ef-18af18788889@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <920f1461-2c2a-430f-28ef-18af18788889@users.sourceforge.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1310 Lines: 40 Hi Markus, On Tue, Sep 26, 2017 at 10:05:59PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > 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 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 > --- > 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 >