From patchwork Thu Apr 20 08:32:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9689895 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8D4CC600C8 for ; Thu, 20 Apr 2017 08:32:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D8AE25223 for ; Thu, 20 Apr 2017 08:32:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F85A28459; Thu, 20 Apr 2017 08:32:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE3A025223 for ; Thu, 20 Apr 2017 08:32:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030620AbdDTIc2 (ORCPT ); Thu, 20 Apr 2017 04:32:28 -0400 Received: from mout.web.de ([212.227.15.4]:65505 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S943715AbdDTIcZ (ORCPT ); Thu, 20 Apr 2017 04:32:25 -0400 Received: from [192.168.1.2] ([77.182.247.81]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MRUC0-1cYQah19om-00Seq3; Thu, 20 Apr 2017 10:32:19 +0200 Subject: [PATCH 8/8] clk: nomadik: Delete error messages for a failed memory allocation in two functions From: SF Markus Elfring To: linux-clk@vger.kernel.org, Michael Turquette , Stephen Boyd Cc: LKML , kernel-janitors@vger.kernel.org, Wolfram Sang References: <94b24eaa-c5fb-80ea-441a-883989d14ef5@users.sourceforge.net> Message-ID: Date: Thu, 20 Apr 2017 10:32:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <94b24eaa-c5fb-80ea-441a-883989d14ef5@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:/PdoeynU9ZfEdU8McdLJaa2urVESMzQO2HAFVoff8e8PmT+otQs AVPMTTN6uzf9E/rpEaxAyF97rUdX/5C9kaAWE5lzmj/2vO850PJqIwNNfRv2/3iUheO2qtc dMvEGYnMH1i0sHyqJggkM5qRIVVT3Po+XpcNTOD7g56ZpcYNv8kv7V48v6pPSZCaYxKvQ5l VI40ewXfHZgsY6b8ZleKg== X-UI-Out-Filterresults: notjunk:1; V01:K0:EISLDtu5K0U=:kH253g4JGGDWJUc1V6tmr4 uYQrwyt+CCnaI3hsJoCYj+I+EA/PL2zn7V/VAQuzHwQQOj61klA27lFI8wf0n8+ubn9ei9zVz QfBtupkJB12TQdFkOKO1DPCmy541x7GHKa0v8ZmONPQsamh+DfpsKXtd7jtMLQLXUqrQveJnP AMtOUV9ALcED9FP37u4tR29M4efmxftwhiw8zFqIv036yYuZaz5zYy4LDziqkD26fdNkiZc7B MyAjeGpDdUZonUmG4NEn5duRHAjhP/j/Ks7Pq7Uhr5GRDhRhXB+/k4k/WUa41ZIpUt46WBOzF 5NbaqLNUnSnEGn9yGVfDMgnstT4MkFTwhCjpNHbPbp6GFfaZ5B3pxKm+kXcqtxgx5P4S9Gd1i k8667YQXqIhLO80iql0qhSEtPdBspcr2fu+lwhM35VbVtutVNySVuE6kAWY1OFTkH0Bcx0h2E iha7Kg/7MuEEq1V7++u8ADkp3DaQSrsmY/wxkCk0kGI26lm4lyXCGZbrFvW0vSoxOr7QjCPJH mgr5MwoVUMbyM/4mo+aNOKdcnvGAEWz12LFqWKqPcq+fofALE62U3moDLTiQGDSFRpR8u7N8+ VAh0nLLxyKAoUSDlGT62R/aTf4w0YdoOrhAijsy/8ogEhEYAiBliHs1ZXtFXX5s6O0HCoyNvj QOVpeEjRe6mGjO73HgK6cdp6ZJsdkEEO17SYhj57j2bMG4DQ4vClHwyFdxy8FLFjnP2ir3gwp dzuqtiLd5VYiAHxFwP8UaSGYf5IhoK/qdkLHXQqkd3iemn9DOOVpEl/SQ47/JWhOMDGNZizqL z4jPB12 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Thu, 20 Apr 2017 10:04:00 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/clk/clk-nomadik.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c index 8d57ab8d6ed8..13ad6d1e5090 100644 --- a/drivers/clk/clk-nomadik.c +++ b/drivers/clk/clk-nomadik.c @@ -267,10 +267,8 @@ pll_clk_register(struct device *dev, const char *name, } pll = kzalloc(sizeof(*pll), GFP_KERNEL); - if (!pll) { - pr_err("%s: could not allocate PLL clk\n", __func__); + if (!pll) return ERR_PTR(-ENOMEM); - } init.name = name; init.ops = &pll_clk_ops; @@ -356,11 +354,9 @@ src_clk_register(struct device *dev, const char *name, struct clk_init_data init; sclk = kzalloc(sizeof(*sclk), GFP_KERNEL); - if (!sclk) { - pr_err("could not allocate SRC clock %s\n", - name); + if (!sclk) return ERR_PTR(-ENOMEM); - } + init.name = name; init.ops = &src_clk_ops; /* Do not force-disable the static SDRAM controller */