Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751973AbdI1QEC (ORCPT ); Thu, 28 Sep 2017 12:04:02 -0400 Received: from mail-io0-f179.google.com ([209.85.223.179]:45213 "EHLO mail-io0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750891AbdI1QEA (ORCPT ); Thu, 28 Sep 2017 12:04:00 -0400 X-Google-Smtp-Source: AOwi7QBB+Y/XiT9hEYtl3XznJv93weocjKKor3Y/7/ibanKQ8k4iWMcJ8SbIpovUpLyoA9ycR+uX2CREW2eMV4Tc8Pg= MIME-Version: 1.0 In-Reply-To: References: From: Ulf Hansson Date: Thu, 28 Sep 2017 18:03:57 +0200 Message-ID: Subject: Re: [PATCH 1/2] clk/ux500: Delete an error message for a failed memory allocation in three functions To: SF Markus Elfring Cc: "linux-arm-kernel@lists.infradead.org" , linux-clk , Michael Turquette , Stephen Boyd , kernel-janitors@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2630 Lines: 75 On 27 September 2017 at 20:46, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 27 Sep 2017 20:23:58 +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 Acked-by: Ulf Hansson > --- > drivers/clk/ux500/clk-prcc.c | 4 +--- > drivers/clk/ux500/clk-prcmu.c | 4 +--- > drivers/clk/ux500/clk-sysctrl.c | 4 +--- > 3 files changed, 3 insertions(+), 9 deletions(-) > > diff --git a/drivers/clk/ux500/clk-prcc.c b/drivers/clk/ux500/clk-prcc.c > index f50592775c9d..5ca07e6d1f64 100644 > --- a/drivers/clk/ux500/clk-prcc.c > +++ b/drivers/clk/ux500/clk-prcc.c > @@ -108,10 +108,8 @@ static struct clk *clk_reg_prcc(const char *name, > } > > clk = kzalloc(sizeof(struct clk_prcc), GFP_KERNEL); > - if (!clk) { > - pr_err("clk_prcc: %s could not allocate clk\n", __func__); > + if (!clk) > return ERR_PTR(-ENOMEM); > - } > > clk->base = ioremap(phy_base, SZ_4K); > if (!clk->base) > diff --git a/drivers/clk/ux500/clk-prcmu.c b/drivers/clk/ux500/clk-prcmu.c > index 6e3e16b2e5ca..c137934f23ab 100644 > --- a/drivers/clk/ux500/clk-prcmu.c > +++ b/drivers/clk/ux500/clk-prcmu.c > @@ -259,10 +259,8 @@ static struct clk *clk_reg_prcmu(const char *name, > } > > clk = kzalloc(sizeof(struct clk_prcmu), GFP_KERNEL); > - if (!clk) { > - pr_err("clk_prcmu: %s could not allocate clk\n", __func__); > + if (!clk) > return ERR_PTR(-ENOMEM); > - } > > clk->cg_sel = cg_sel; > clk->is_prepared = 1; > diff --git a/drivers/clk/ux500/clk-sysctrl.c b/drivers/clk/ux500/clk-sysctrl.c > index 8a4e93ce1e42..e0a834c08a04 100644 > --- a/drivers/clk/ux500/clk-sysctrl.c > +++ b/drivers/clk/ux500/clk-sysctrl.c > @@ -140,10 +140,8 @@ static struct clk *clk_reg_sysctrl(struct device *dev, > } > > clk = devm_kzalloc(dev, sizeof(struct clk_sysctrl), GFP_KERNEL); > - if (!clk) { > - dev_err(dev, "clk_sysctrl: could not allocate clk\n"); > + if (!clk) > return ERR_PTR(-ENOMEM); > - } > > /* set main clock registers */ > clk->reg_sel[0] = reg_sel[0]; > -- > 2.14.2 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel