Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031162AbdIZPF3 (ORCPT ); Tue, 26 Sep 2017 11:05:29 -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 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1235 Lines: 38 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 --- 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); -- 2.14.1