From patchwork Tue Sep 26 20:05:59 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: 9972619 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 F3053602BD for ; Tue, 26 Sep 2017 20:06:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E49FB28F91 for ; Tue, 26 Sep 2017 20:06:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D966828F94; Tue, 26 Sep 2017 20:06:11 +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 5A0AA28F91 for ; Tue, 26 Sep 2017 20:06:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967299AbdIZUGK (ORCPT ); Tue, 26 Sep 2017 16:06:10 -0400 Received: from mout.web.de ([212.227.17.11]:61040 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965209AbdIZUGH (ORCPT ); Tue, 26 Sep 2017 16:06:07 -0400 Received: from [192.168.1.3] ([78.49.148.35]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MGicf-1eAMFE0s9h-00DYle; Tue, 26 Sep 2017 22:06:01 +0200 To: linux-clk@vger.kernel.org, Haojian Zhuang , Leo Yan , Michael Turquette , Stephen Boyd Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] clk: hisilicon: Delete an error message for a failed memory allocation in hisi_register_clkgate_sep() Message-ID: <920f1461-2c2a-430f-28ef-18af18788889@users.sourceforge.net> Date: Tue, 26 Sep 2017 22:05:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:Kfpd4ntZq5Ysc7GhuIHYzPuC3ISc0y8Jaj7CQUmPNVooW4nppm5 x75UbA7CzWxowFeHXKcMSAaDu+K69Jm7J5rMlaK/zSVj2xMMClXbVZ9APdt0khEUKY7MbHm GJsHx8ut7FRluYpN7B2xn2DI6cCfnIePgtrgoIF91uguyPECimW/ZYckh1wcCkyuHBcNt88 x1G1n93gXqcS56gz+43Eg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Gnkz3hF9EN8=:qtCvVi69h/mg8G5OClxSKa 1C9EeqTeYedfPnnKFByVKq0D43GpgCMEPHztiVe3WkB11An9Ox90b1P2dIwxuHvdOeugLXufv yXuZRBs9daAJsovAlt2X5hKsRMnCpteckUUgVD82N3Cs7RBgR/M6rgLCDLKPmTtqiD6V+Ntuc IoMIAmDgJ2oi2GbXiDtwyahc/GziY16fFp5vVV9M2S0bvTVe4GV/RJVZw3VAJooOzHwYF7tbR ibhi8axcjNxy5F7AUHW7yK9/3IiwEOpwYvfEK3RxwNUrGCFXzrmnHTA9PdHjwWFs/Bh2y6bK3 NpgE5TaUbnmUoC9/yuxJ/KgMpwWJrxwqag4qCDTKQqfp3Edx5TxOSwjs+IrLhYPhj2VnFvq8J F2weqQileihV+lRg2QpQfIq8NSh23GMfqozN8XMWeYATRMqzRU2L+lsIq7RyRSt6+BKClXAxI 8+54z3SzDgUjqV+cc24PWosJM3zAfqtjpgrx3Ksh03X9k/+wxfGsjk+RV2a0wuYcXHkE+gvSL tNMDiovQH0qm1qEjbrz89j0aU53zw6DrpoVrU8wuDh2cUut5J41GWyQM7nIx4G89U+ZIWIeUm VxZecGnILCiuMCLRkGh9opT0Dva4z7FJNtLUbEiBIpEPx5kwluC6qa5BPk4e/hwTauZTwehQN 5BsJJh/delwXuGxMkxMBRNfdSE57meAFvl+bH+NnDgTmj/LZZEJHDGliSTczywJQQf93DD8AN ePfBBEW6A2Tz7zMwY1DP+F9orguoNouwO0W6Qtsv7Q2YdQhPj8OlICjsnH8ca+urq8/4ES2qB 19MDZnqEn7yUEsRXKeZ2wv/sW0FnxWYV10KQkiuJ1fjlfGJGiM= 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: 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 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;