From patchwork Tue Sep 26 16:21:42 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: 9972301 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 45E1A60365 for ; Tue, 26 Sep 2017 16:21:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3613E28E7C for ; Tue, 26 Sep 2017 16:21:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AA5528E7F; Tue, 26 Sep 2017 16:21:51 +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 A952E28E7C for ; Tue, 26 Sep 2017 16:21:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967091AbdIZQVu (ORCPT ); Tue, 26 Sep 2017 12:21:50 -0400 Received: from mout.web.de ([212.227.17.12]:49385 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964791AbdIZQVt (ORCPT ); Tue, 26 Sep 2017 12:21:49 -0400 Received: from [192.168.1.3] ([78.49.148.35]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lheqz-1dbF7G2w3V-00mtgU; Tue, 26 Sep 2017 18:21:43 +0200 Subject: [PATCH 1/2] clk-mux: Delete an error message for a failed memory allocation in clk_hw_register_mux_table() From: SF Markus Elfring To: linux-clk@vger.kernel.org, Michael Turquette , Stephen Boyd Cc: LKML , kernel-janitors@vger.kernel.org References: <0d223969-36c3-6f78-97cb-46c074207d2f@users.sourceforge.net> Message-ID: <31bc9968-20e9-1fd0-0f16-80cb0f2bffe0@users.sourceforge.net> Date: Tue, 26 Sep 2017 18:21:42 +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: <0d223969-36c3-6f78-97cb-46c074207d2f@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:BdrgIkipOR442OYD/cnTDxm3b8LKNj2MmQ0Rf14cQfjK3dV+dwF SKeTTyj2B1x4bVNG6gxXKlz5RZFEiiPBzD4pQxuYKPgxvNk11kWXL7kvbH+TeUOjNcMUu0P aEOj1+e8sotHt3hTQpJX4dlfOjPWADfsP5yt2AiW6DsYRY+Hejyk7p32MPBORz5ip4L/6Zy EuSFmHDoyhjFnfl7jY0tQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:GWuA91FOT0A=:6LkTIeeCVVjdNmNOYnyC2W cUOiQRBhDGnh4nNBNZbzggmFeaGsKNJog5FS64vJq52eymFv3O+mQnmfQpI9B55QVvbZYT1o7 myx6FJ6GLeEW/8Schup2UjEzCwJzwbWNzh9Hk1UreW+zGqxE4rCOvm87LjIht/yqkR0mvPB9A r3lYSK1gm0ZcV4raXgiJHItOsXKjThGUIwWmklbkIETS3KwVmIrF49GhtBNJcCESSe8xgR7wV eUNSE+P7tNBCltASJOXKT0+RDZMU9jgnYU9NLAfBZ6JSOIK2BwcbCA54PXW1bYScCOJ23ZodC Tu9GdfhP6lY6axh+wdthMfeGtQ0pAbRhFHZ9Fua7S0n0RLC4EE5rQthILW3o7IWGow1SQI1GP ElNPRORxqvk6ILWhPM2FMeJAcsRFHsb35fKY+RgXR/pK5bMCDi6ohFYsQ5asBsADMDpTaaz6l OHA5qqSh5NFUZAKi1QZ19evSjDyMFHE3w2n1yFh9mjFaj6cQN/QHJ4FxcuSNzDj7ZAdfwg3QN akZ0jQbweTGCv21pc9TCsoMAHE9ZREzTTt8LQ2iHlvbVgvOSQmV018f3q8y2t+NFuf3f7Hrbs NzS1vzown23b+QM9CUb6553axvr4h5bLjnC3FrrVNJUSBPwYmSzJFwTeRlOvmv11ZB+osLYa2 Ovw8q0o0aUZEpC5j1YF0L93ZUTvCP6o8D4Gy/wZSbConsqryOdYNVSK7MuX6y63K9g9xxyDjB m8PE/suhRRgKKXEh+5di9I/FQuaHvu5WS5ru+iPAgjF6BzmZiuHFhqy7z5PH1z2++VVA3g9cj FdVsIOD/icaK5IZ6ZAGP1r8xH8497ER0cFgO4NpNuujXEyShmk= 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 17:23:04 +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 --- drivers/clk/clk-mux.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c index 16a3d5717f4e..1746dbf2f7ea 100644 --- a/drivers/clk/clk-mux.c +++ b/drivers/clk/clk-mux.c @@ -135,10 +135,8 @@ struct clk_hw *clk_hw_register_mux_table(struct device *dev, const char *name, /* allocate the mux */ mux = kzalloc(sizeof(struct clk_mux), GFP_KERNEL); - if (!mux) { - pr_err("%s: could not allocate mux clk\n", __func__); + if (!mux) return ERR_PTR(-ENOMEM); - } init.name = name; if (clk_mux_flags & CLK_MUX_READ_ONLY)