From patchwork Mon Sep 25 08:34:24 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: 9969449 X-Patchwork-Delegate: geert@linux-m68k.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 89D52602D8 for ; Mon, 25 Sep 2017 08:35:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E2A828BFF for ; Mon, 25 Sep 2017 08:35:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7210628C41; Mon, 25 Sep 2017 08:35:13 +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=unavailable 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 0850228BFF for ; Mon, 25 Sep 2017 08:35:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934226AbdIYIey (ORCPT ); Mon, 25 Sep 2017 04:34:54 -0400 Received: from mout.web.de ([212.227.17.11]:50764 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932364AbdIYIeu (ORCPT ); Mon, 25 Sep 2017 04:34:50 -0400 Received: from [192.168.1.2] ([78.49.45.115]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LuuS5-1dEZbO1lbt-0106Ew; Mon, 25 Sep 2017 10:34:35 +0200 Subject: [PATCH] clk/Renesas: Delete an error message for a failed memory allocation in three functions To: linux-clk@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven , Laurent Pinchart , Michael Turquette , Simon Horman , Stephen Boyd , Ulf Hansson Cc: LKML , kernel-janitors@vger.kernel.org, Wolfram Sang References: <566ABCD9.1060404@users.sourceforge.net> <2927869.3rNkSDiBcX@avalon> <64106728.50RHrbMaf7@avalon> From: SF Markus Elfring Message-ID: <7fa950f5-01b5-fa9b-e4e9-4ed944f46e32@users.sourceforge.net> Date: Mon, 25 Sep 2017 10:34:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <64106728.50RHrbMaf7@avalon> Content-Language: en-GB X-Provags-ID: V03:K0:PyrcKMg2yGVfI809F52eOM5IIAa5Y6bryourVlZn8BEecrDPxoL 9V0gllKou5gcnuFCu486HZEF8XUbWzq1O3z4nyC3kxmYzAK50cwNHsqKyPBVRLpO1Ow89+W rXTdGKP6IPImFvKRid1EeB8aoBP5simYGsHhGseyssbTApE2vDWR32ZLXY40Kdy1DHPWK7r QwMNdQ5+dmKaC1pmDOvEw== X-UI-Out-Filterresults: notjunk:1; V01:K0:2zqFJSy393o=:mpJBAgccjWUkyyouPtKEfJ 7BeXFz+6xR/Ux19gRR6Zutgz4783J/ll6kkwhQusqR6QXpSIRjh+jTHA3ufkRbqxGkOc6tUE9 ri0/jTrrSlK05F25IfAv7VanQfSS7JK2JeHxJjQ95M9l6cvKG/KA/nF4Iu4JcFEexZ94FE4ok xiCwt16HpJ8aMpaMn4qM/QbNX0Vm2aiHx7igijSl4BR/kXf5N/EF0dqEdqLWJHjvfCsMzf7pD n9MjE1I38y2aXvnRqnvOQNxY8g8xhmMT22m2RGqgATawbEm7JmgdXnLjSnBP41JfugU5RkNvw PzzJW3Sj0A+trMd/i+LChohKXtcOx7q3yPVn32GfW9PIIkjLAdGw2TNVWNj0dKesJX1V2GIyW UJGHJnDTvp/REdSYUGmOfLuPZlC8sk4EmRza+UUcCNCmWc24LA5g7iepRRykn170iPhtkX+Qk H0w2xIxZ/5qquXt0lftfWwb65MDNlRkb1kXKA4nzap534PektqMJ546e7Otl1WWD8mTkqaSmp oglZNaEn25cNldB+wZxx91h2NCZ+JsWUgQ6XQH5tLs/xYA5wBUJawZ3YKlatdyXEZKanwCUef r90y5QsEJ08Y2lmb3AvfXcI2xB4rJEFg8ByFYPwm+1ixGhXbVh540baWPj6dYvfV3jw10iPDx TsLB8/Npx4Dyr0lHO3m5GbMGaUdpdpx40cyuMkLAQU7bmn4vvTMU+Xjq5qJu4zZMJMhhvevjG Vdjif8ubp3dkf6xnwIfHBit5yc0oCtGvsB3EHGSMiXYCOFl4cuND+9zX6vLQp2TjCrt1akYjX t0h27zfuz83L+mRSmRKJJgZRyDbakSD68z0Ir411PXtO85W9g0= Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Mon, 25 Sep 2017 10:10:51 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus fix affected source code places. Signed-off-by: Markus Elfring Reviewed-by: Geert Uytterhoeven --- drivers/clk/renesas/clk-mstp.c | 5 +---- drivers/clk/renesas/clk-rcar-gen2.c | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/clk/renesas/clk-mstp.c b/drivers/clk/renesas/clk-mstp.c index 500a9e4e03c4..c944cc421e30 100644 --- a/drivers/clk/renesas/clk-mstp.c +++ b/drivers/clk/renesas/clk-mstp.c @@ -156,10 +156,8 @@ static struct clk * __init cpg_mstp_clock_register(const char *name, struct clk *clk; clock = kzalloc(sizeof(*clock), GFP_KERNEL); - if (!clock) { - pr_err("%s: failed to allocate MSTP clock.\n", __func__); + if (!clock) return ERR_PTR(-ENOMEM); - } init.name = name; init.ops = &cpg_mstp_clock_ops; @@ -196,7 +194,6 @@ static void __init cpg_mstp_clocks_init(struct device_node *np) if (group == NULL || clks == NULL) { kfree(group); kfree(clks); - pr_err("%s: failed to allocate group\n", __func__); return; } diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c index 0b2e56d0d94b..d14cbe1ca29a 100644 --- a/drivers/clk/renesas/clk-rcar-gen2.c +++ b/drivers/clk/renesas/clk-rcar-gen2.c @@ -423,7 +423,6 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np) /* We're leaking memory on purpose, there's no point in cleaning * up as the system won't boot anyway. */ - pr_err("%s: failed to allocate cpg\n", __func__); return; }