From patchwork Tue Sep 26 15:05:19 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: 9972271 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 4CEE46037E for ; Tue, 26 Sep 2017 15:05:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BFE5284AF for ; Tue, 26 Sep 2017 15:05:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 301EC286F9; Tue, 26 Sep 2017 15:05:29 +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 CF50B284AF for ; Tue, 26 Sep 2017 15:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968059AbdIZPF2 (ORCPT ); Tue, 26 Sep 2017 11:05:28 -0400 Received: from mout.web.de ([212.227.17.12]:59752 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967121AbdIZPF1 (ORCPT ); Tue, 26 Sep 2017 11:05:27 -0400 Received: from [192.168.1.3] ([78.49.148.35]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MbQOe-1dgHye3ldk-00IjvI; Tue, 26 Sep 2017 17:05:21 +0200 To: bcm-kernel-feedback-list@broadcom.com, linux-clk@vger.kernel.org, Alex Elder , Florian Fainelli , Michael Turquette , Ray Jui , Scott Branden , Stephen Boyd Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] [media] clk-kona-setup: Delete two error messages for a failed memory allocation in parent_process() Message-ID: <022c9ba4-f3c4-e4e3-f804-2bd54937a138@users.sourceforge.net> Date: Tue, 26 Sep 2017 17:05:19 +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:tW0hGGh4fN5/cDfHvWfeGpKA0hpTmD4FRkImhWaVEtVOU/EEnJN aT5GGEDNAQzyRkj6sSY7PaoJ9c+FtpfBvGc2QUUyotZGgqzxVCWM055ohfr8L7QBmfoioY/ mG2w8bW0ObmmLveKLbsgrDRNuyYzLPNns5WMPSltb+I6Xh/84N6fa6zR0qvH4KHtoY1KlkX JIYcXO5qHrv/MPFUtdIuA== X-UI-Out-Filterresults: notjunk:1; V01:K0:Ro21j6SN9UY=:BcEMHQrw1MmeCCiwjIceAK 1YRM8i1+4APjBBScsnBJ8fobPYXqoAjCqufaqsDqnGNx71SNqo75L5utUUzf34d5We06JIPQR 93QlVQLjDXlOalUxtf2ZXgJkjzyDy2R1bVjXcPj5koL4kTYLJnAMq7C8FCd/RIkVODB33omoq cS+OZh2lRlVd3B1E2woeIsKRhCkHt+psMDKHbMm6CZ/A0dn1LUkvqU16k6mpYQ/D/Ep2Udw+D NEVSQs7Sj2S6rYUk29mx8ZZp6z3Rn+w/5v1yKguONhva3xpcAkO+MLvfKe3GPmsYjy6KsKk8k 4JdQPAptLiaASm6a+3mUhD1ui5E32fDJK7+L1RkMCZCBsi3jKk3EC8n6Ch1OZrURzHzPZAQNT kY40pcDTIeIu19cxA8iYmfmMgV7fEHngP1d5ZjKm0W9dd41PXQEfeY4+oXQz83FO2im1mbbVh X09MIviCQUxdVCejv6hgEs/++pSf5Yk2Lo8H+3lFQ01HvCLMYFZWTI9o4irsEl+irsMEy31Bx LDu2PF+ARM28Cz6+EDXp4Ohh8Hh3zyXxedgXdLARUTmqnGgwcMANK4Xq0bh0Ezr7hjE0hUgOP oIZHONqZwhlSm6EPEvOR9tRLuhyY7aNSXJi8cj59pQRI+jdCXQpjRuxcnTygCbpdX811FxbdR pH/JVPUg3zKytxqdSjWTDSj8oG8dOMMaB5yu0ju4hrW1E8n1CF0DFYETfyexJYZUYpvbi/rbi vx4dAxjsHPM7gokpj/bsSvTUEGnm79ZckvVui/u8H39p5hqKDFv5dbJDuTl8PqOA9CDUwEb27 1wLU3ltw9J3Q3YNDHn30fh1QmGctWtpZi380euXx/n6b4JoXQ8= 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 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);