Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969150AbdIZQrH (ORCPT ); Tue, 26 Sep 2017 12:47:07 -0400 Received: from mail-wr0-f178.google.com ([209.85.128.178]:44716 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936419AbdIZQrA (ORCPT ); Tue, 26 Sep 2017 12:47:00 -0400 X-Google-Smtp-Source: AOwi7QCrBMGXU5OKJk9UMA7mDRHHMGc8i9r8fODsU5d2jVvFRcb8KRgNLxdsgXwp5PSucaFiQ7ywXw== Subject: Re: [PATCH] [media] clk-kona-setup: Delete two error messages for a failed memory allocation in parent_process() To: SF Markus Elfring , bcm-kernel-feedback-list@broadcom.com, linux-clk@vger.kernel.org, Alex Elder , Florian Fainelli , Michael Turquette , Ray Jui , Scott Branden , Stephen Boyd References: <022c9ba4-f3c4-e4e3-f804-2bd54937a138@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org From: Scott Branden Message-ID: Date: Tue, 26 Sep 2017 09:46:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <022c9ba4-f3c4-e4e3-f804-2bd54937a138@users.sourceforge.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1428 Lines: 41 Thanks for cleanup. On 17-09-26 08:05 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 26 Sep 2017 16:54:20 +0200 > > 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 Acked-by: Scott Branden > --- > drivers/clk/bcm/clk-kona-setup.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/clk/bcm/clk-kona-setup.c b/drivers/clk/bcm/clk-kona-setup.c > index c37a7f0e83aa..281f4322355c 100644 > --- a/drivers/clk/bcm/clk-kona-setup.c > +++ b/drivers/clk/bcm/clk-kona-setup.c > @@ -579,18 +579,13 @@ static u32 *parent_process(const char *clocks[], > */ > parent_names = kmalloc_array(parent_count, sizeof(*parent_names), > GFP_KERNEL); > - if (!parent_names) { > - pr_err("%s: error allocating %u parent names\n", __func__, > - parent_count); > + if (!parent_names) > return ERR_PTR(-ENOMEM); > - } > > /* There is at least one parent, so allocate a selector array */ > parent_sel = kmalloc_array(parent_count, sizeof(*parent_sel), > GFP_KERNEL); > if (!parent_sel) { > - pr_err("%s: error allocating %u parent selectors\n", __func__, > - parent_count); > kfree(parent_names); > > return ERR_PTR(-ENOMEM);